How to I change the default path people are directed to once they've logged in? Currently it's directs to
http://localhost:3000/
but I'd like it to direct to
http://localhost:3000/user
r
rp_st
03/11/2023, 1:08 PM
Hey @Kranos
rp_st
03/11/2023, 1:08 PM
See the section about redirection post login in our docs.
k
Kranos
03/11/2023, 1:10 PM
Ah sorry, couldn't find that earlier!
This bit right?
Copy code
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
if (context.redirectToPath !== undefined) {
// we are navigating back to where the user was before they authenticated
return context.redirectToPath;
}
return "/dashboard";
}
return undefined;
}
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).