I had in mind early year discussion around replicating the identity in NodeJS that it was not yet possible but after checking the thread I started, I landed on following solution which I did not tested but actually seems now to work according feedback Using @dfinity/agent in node.js - #55 by ZenVoich
Does it and would it work for you?