Hey everyone i am using NextJS to build out a webapp i was curious is there anyway that i can use su...
h
Hey everyone i am using NextJS to build out a webapp i was curious is there anyway that i can use supertokens
r
Hey. Yes, there is! What type of login method do you want to use?
You can pick the login method here: https://supertokens.com/docs/guides
And then navigate to the integrations > NextJS section
h
Actually my frontend is on next and my backend api is on node can you tell me how can i integrate both so a user which registers or logins and i can acsess its id on the node backend
r
So for that, just follow our NextJS guide for the frontend SDK part only. Ignore everything to do with the supertokens-node SDK that’s in the NextJS guide
For node integration, see the quick setup section -> pre built ui setup -> backend
h
r
That’s for the frontend stuff only.
For node, follow this
h
Oh ok thanks alot i will let you know if it works or if i get any issues
Hey Bro i have completed the nextjs guide have created the config , appinfo , frontend and backend files and wrapped the root component with SuperTokensWrapper
Should i create backend config from this guide or should i follow the node one and just leave it here ?
r
follow the node one
h
so i just get the frontend confing and app config and wrap the SuperTokensWrapper around the main root component and follow the node tutorial now right ?
r
yea. You also need to setup the frontend to show the pre built UI. This is also in the nextjs guide
r
yea
h
one more thing is i am using app directory with js that will be fine right ?
i am not getting the login ui here is the path : app/(auth)/auth/[...path]/page.jsx
r
try out our example app first and see what the differences are please.
h
its same except its in pages
r
h
its same as mine
r
Well, the above example app works, so maybe there is some diff that you missed out on