https://supertokens.com/ logo
Title
a

aj-ya

01/24/2023, 8:03 AM
hey i'm using a fastify backend and a next frontend for my application. i want to get the session on the next serverside. i'm a bit confused with the doc(https://supertokens.com/docs/thirdpartypasswordless/nextjs/session-verification/in-ssr) . do i need to init with the backend config again in next to access that? and is there any other way...
r

rp

01/24/2023, 8:35 AM
hey @aj-ya
you do need to do init on the backend - yes. We are working on a change which will be released in a few weeks which will make this simpler
but at the moment, you have to call the init on the next backend for SSR to work (as mentioned in the docs)
a

aj-ya

01/24/2023, 8:38 AM
hey @rp, thanks for the quick reply.
but I have defined overrides in the fastify backend config that depend on some more packages/logic (like prisma,etc)... what do i do?
r

rp

01/24/2023, 8:41 AM
You probably don’t need to overrides in the next backend. Just need to initialise the session recipe on the next backend, and the only function you will use there is Session.getSession anyway. So unless you are overriding the getSession function as well, no overrides needed in next backend
a

aj-ya

01/24/2023, 8:42 AM
will try this. thanks a lot 👍