Hi, now I'm trying to configure server part of my application. So I'm looking for creating server to proxy my requests from multiple frontend domains to one another frontend domain with login ui, which is used for supertokens authentication with social, emailpassword and passwordless. Is there any ability to create this Oauth 2.0 Server within Supertokens structure functionality or integration way to use Oauth 2.0 Server from another source?
r
rp_st
07/28/2022, 10:44 AM
We are not yet an OAuth 2.0 provider, so you will have to use some custom method to transfer user info across apps, or use an OAuth 2.0 provider solution on top using some lib
rp_st
07/28/2022, 10:46 AM
We are working on being an oauth 2 provider, but until then, an easy method it to call some callback URL in the other app and in that callback, you can pass the sessionHandle of the session as a fragment of the URL like:
rp_st
07/28/2022, 10:46 AM
Copy code
https://otherapp.com/callback#<sessionHandle>
rp_st
07/28/2022, 10:47 AM
That route can then take the sessionHandle and send to some backend API for that app, in which you could query the SuperTokens core to check if the sessionHandle is valid - if it is, you can create a new session for that user ID (for otherapp.com).
rp_st
07/28/2022, 10:48 AM
If you want to be more secure, instead of passing a sessionHandle, you can pass a one time use code that is mapped to the sessionHandle on your backend -> this becomes very similar to an OAuth flow.
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).