Hey,
I use docs Nextjs app dir. I added SuperTokens.init() in root layout but I have the error: ``Error: Initialisation not done. Did you forget to call the SuperTokens.init or Session.init function?
``. I don't use backend config and withSession for Nextjs because I've backend in Nestjs.
I have this error in sessionUtils file:
Copy code
let session = await Session.getSession(baseRequest, baseResponse, options);
.
r
rp_st
11/02/2023, 5:17 PM
hey @weboux you need to initialise supertokens backend SDK as well, since you are using the session recipe from it.
w
weboux
11/02/2023, 10:12 PM
so Can I use supertokens-web-js when I use nestjs?
r
rp_st
11/03/2023, 4:10 AM
For nestjs, you have to use supertokens-node
w
weboux
11/03/2023, 1:20 PM
Ah sorry, I meant nextjs. Typo 😅
r
rp_st
11/03/2023, 1:31 PM
yea you can use web-js sdk
rp_st
11/03/2023, 1:32 PM
but for session functions, you have to also use node sdk
w
weboux
11/03/2023, 1:49 PM
So in Nextjs web-js sdk and node sdk in nestjs and in nextjs for „data fetching by nextjs” in React server components I should use nextjs/headers in order to add cookies?
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).