Hello everyone, I have a react frontend react app that consumes a backend api written in Ruby on Rails. I would love to use SuperTokens for authentication but I'm afraid that it won't work because SuperTokens doesn't support Ruby as backend yet. Would there still be a possibility for it working if I just implement it in the frontend with the react library? I was thinking maybe it would work if I just save the matching user record of the logged in user in the backend database and compare it.
r
rp_st
09/04/2022, 7:57 AM
Hey @flow-wizard
rp_st
09/04/2022, 7:58 AM
The frontend doesn’t talk to the supertokens core directly. The backend SDK is needed cause that exposes all the APIs that the frontend can call
rp_st
09/04/2022, 7:59 AM
So you would need to have a node, golang or python process which integrates our backend SDK.
rp_st
09/04/2022, 7:59 AM
That would issue a JWT on login which you can sent to your Ruby on Rails backend
f
flow-wizard
09/04/2022, 1:52 PM
cool, I thought that maybe I can run the node.js server on the same ec2 instance for the authentication with supertokens and then use the rails server for everything else. But then... how does the rails server know that the user is authenticated 🤔
r
rp_st
09/04/2022, 1:55 PM
Yea that works. The rails server’s API would accept a JWT and verify that with supertokens
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).