Best practice for automatic / custom login with an existing user database

We have an existing app server (NodeJS / MySQL) with an API which is used for our apps and web frontend. We want now integrate RocketChat in our apps and also in the web frontend. We don’t want a seperate login for the chat for our users because we already work with a JWT token from our API.

All we want is that the user can use rocket chat inside of our app / web app without to log in again. What is the best practice to achive this? Automatically creating new accounts on the Rocket.Chat Server for each user and storing the user/password on our app server / clients? Or creating an OAuth server with our user base and configuring RocketChat for OAuth? Can we achieve that OAuth login works automatically (which means that the user won’t see any login screen or has to accept something)?

2 Likes