Rails, Node.js server-to-server authentication

So, I am creating a rails application that also uses node.js for real-time functions. What is the best way to authenticate users in a node application if they were created using rails? I thought about saving the session id in db, and then checked with it, or maybe displayed the user id on the page, and then sent it to the node application when they connected. Or maybe something else would be best. I use mongoose for my node orm and mongoid for ruby.

+6
source share
1 answer

Saving the session identifier in your database is a valid approach; I do this in my own applications.

+3
source

Source: https://habr.com/ru/post/888158/


All Articles