Do I have to run supertokens.init() for every api route in Next.js if I am not deploying in a serverless environment?
r
rp_st
01/25/2023, 5:02 AM
U don’t have to run that if not deployed in serverless env.
n
Nightlight
01/25/2023, 5:05 AM
Where would be the appropriate place to call this in a non serverless env? in the _app.tsx file?
r
rp_st
01/25/2023, 5:09 AM
Yea. If you knows it’s the backend and not the frontend. So maybe call it when something like process.env is not undefined. Not sure what the right check is
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).