But it redirect to /auth and therefore after I am back to the / page instead of the page from with I called redirect.
How can I do so that it redirect to the previous page ?
Thanks.
r
rp_st
01/02/2024, 4:23 PM
hey @kyomster when redirecting to
/auth
, you can do
/auth?redirectToPath=<PAGE PATH TO REDIRECT BACK TO>
. Note that you have to url encode the value you set to
redirectToPath
k
kyomster
01/03/2024, 2:36 PM
How can I get the page url to redirect to ? I did not find a way to find to get the current page url so that I can redirect back to it.
r
rp_st
01/03/2024, 2:37 PM
I guess it’s the current request path? Since it’s server side rendering
k
kyomster
01/03/2024, 3:18 PM
yes, and how can i get it from a SSR page ?
r
rp_st
01/03/2024, 3:22 PM
I’m not sure. But you can ask the NextJS community.
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).