You're looking for an SSO plugin or the Session Sharing plugin.

https://github.com/julianlam/nodebb-plugin-session-sharing