https://supertokens.com/ logo
f

filip

03/21/2022, 8:49 PM
hello, I'm trying to implement SuperTokens to my app and I'm unsure which guide should I follow. I'm using NextJS, express and GraphQL. The goal would of course be to have access to user data on the backend. I'm not sure what would be the best way to do that here. I'm kind of new to NextJS so I am unsure how exactly the API routes work, is it possible to manage the auth in NextJS and then send all of the data to my backend through a mutation? Or should the auth be managed on the backend? I haven't been able to make that work.
r

rp

03/22/2022, 3:46 AM
Hey @User which recipe do you want to use? In each recipe, there is a section for NextJS that you can follow.
f

filip

03/22/2022, 8:16 AM
Hi, I'm trying to use ThirdPartyEmailPassword Recipe. I have been able to follow the NextJS section, but I am stuck on how to get the session info. How do I get the user info and send it to my backend to store it?
r

rp

03/22/2022, 8:17 AM
Do you want to do this when the user signs up? Like a post sign up hook?
f

filip

03/22/2022, 8:18 AM
yeah, basically
See "On the backend" section
f

filip

03/22/2022, 8:25 AM
thanks
2 Views