How can I exchange authentication in a rails / rack application with an instance of node.js?

I tried to figure out how to integrate a node.js application into a rails application and have their common sessions. Until now, I could only dig up exchange sessions between Sinatra and rubies on rails through the middleware of the rack. Can this be done?

I was thinking of a workaround for introducing a leisure service that crowds out the manual that node.js can use to create its own session. This solution, however, requires model verification announcements that are stored in two separate applications.

just wondering if there is a way to integrate them.

and when using js-based web graphics like geddy or express, cool, I have many existing rail codes and third-party libraries, such as an active merchant, that I would have to invent.

+6
ruby-on-rails session rack
source share
2 answers

how by using something like memcached to share a checking mechanism, for example, to set up a session on rails and a token is specified on the nodeJs server for each message, nodeJs checks memcached if the token exists and provides or rejects based on this, you certainly would add memcached entry from rails application

+2
source share

Isn't that the same as sharing authentication between two different domains like openid, facebook connect, twitter sign-in.

  • from rails do openid as a redirect to node.js with authentication information encrypted inside url and vica versa?

  • I am wondering if it is not possible to use the Custom OAuth Provider Strategy from connect-auth and vica versa, because connect-auth is a "Connection Authentication Tool". I did not understand all the details, but could this be an option?

+1
source share

All Articles