https://supertokens.com/ logo
y

Yashwant

06/03/2022, 5:29 PM
r

rp

06/03/2022, 5:36 PM
Hey @Yashwant
That’s the same redirect callback that you had set for the social login provider
y

Yashwant

06/03/2022, 5:49 PM
Okay
One more thing In the docs the callback urls are of frontend.. So basically the auth code from social login providers will be sent to frontend?
r

rp

06/03/2022, 5:51 PM
yes. correct
and in that page, you need to call the API you linked to above. Which will consume the code and return a new session for you
y

Yashwant

06/03/2022, 5:54 PM
I am not really a frontend developer so this might be silly.. I have my login page at /login so I should set my callbacks to /login and then I can get a result on this page with a code.. then I will call the above linked API
r

rp

06/03/2022, 5:55 PM
you should have your call back on another path. Like /auth/callback or something.
and on that page, you extract the code from the query param and call the API
y

Yashwant

06/03/2022, 5:56 PM
Okay
Thabks
r

rp

06/03/2022, 5:56 PM
here is a blog that guides you on how to go about it: https://supertokens.com/blog/adding-social-login-to-your-website-with-supertokens
2 Views