mwill888605/13/2022, 6:21 PM
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
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
into my NextJS app,
, however whenever I try to access
import SuperTokens from 'supertokens-website'
i get an error stating that SuperTokens is undefined. I have initialized SuperTokens in the _app.ts file. I can use
rp05/13/2022, 6:23 PM
This will allow your child component to render even if the user is not logged in, and in there, you can use the session context to see check if a user is not logged in and then redirect them to wherever you like with the query params intact.
mwill888605/13/2022, 6:36 PM
rp05/13/2022, 6:36 PM
mwill888605/13/2022, 7:57 PM
returns false even after sign up. We do have our own UI for the signup and login screens following: https://supertokens.com/blog/adding-social-login-to-your-website-with-supertokens I don't know if that's effecting it or not.
then checked the context in the individual pages. Now the context comes back correctly.