Hello, there! I'm currently trying to implement third party recipe in my project (vanilla js + nestjs). I added the backend support which seems to be working fine. Now I'm trying to implement a custom login ui according to this guide: https://supertokens.com/blog/adding-social-login-to-your-website-with-supertokens. I managed to successfully redirect the user to the third party auth page which is step 1 of the guide, however I'm not really understanding where I'm supposed to place the code of step 2. I would be very grateful if somebody could clarify it for me.
r
rp_st
05/01/2022, 12:26 PM
Hey
rp_st
05/01/2022, 12:27 PM
The code for step two should be on your frontend app. In the callback path which you have configured on the social provider’s dashboard
r
ravaelamanov
05/01/2022, 12:34 PM
Thanks for your reply. I understand that it should be on the frontend. Let me clarify my problem then. Here's a link to the code snippet that executes when the user presses the third party auth button in the sign up form: https://pastebin.com/2pANXeDe. There's a comment in signinup function the clarifies the problem.
r
rp_st
05/01/2022, 12:40 PM
T
rp_st
05/01/2022, 12:41 PM
Hey! So the code for fetching the “code” from@the url and calling the signInUp api should go on the page where the user is redirected back to from the social login provider
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).