I need to redirect to auth if a user is not logged in, I can use
ThirdPartyEmailPassword
to wrap my components but when I try to access a protected route including url search params, only the base of the route is send to the auth page as the redirectToPath and does not include my url search params.
I'd prefer not to roll my own wrapper, so is there a way to configure
ThirdPartyEmailPassword
to include url search params in the redirectToPath?
If not, I figure i have to create my own wrapper that checks if the user is logged in. I've tried importing
supertokens-website
into my NextJS app,
import SuperTokens from 'supertokens-website'
, however whenever I try to access
SuperTokens.doesSessionExist()
i get an error stating that SuperTokens is undefined. I have initialized SuperTokens in the _app.ts file. I can use
supertokens-auth-react
but not
supertokens-website
.