https://supertokens.com/ logo
r

ravaelamanov

05/01/2022, 10:49 AM
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

05/01/2022, 12:26 PM
Hey
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

05/01/2022, 12:40 PM
T
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
r

ravaelamanov

05/01/2022, 12:43 PM
Thank you very much!
3 Views