@venkat have you looked at the session sharing plugin?
Link Preview Image GitHub - julianlam/nodebb-plugin-session-sharing: Allows login sessions from your app to persist in NodeBBAllows login sessions from your app to persist in NodeBB - julianlam/nodebb-plugin-session-sharing
faviconGitHub (github.com)
It provide functions for retrieving the NodeBB id from your id.
Using that plugin is the recommended way of sharing sessions between applications.
Changing the NodeBB id format is a futile effort. You can't just change it to a string. The closest you can do is map your id to the NodeBB id.