I am using supertokens-core 3.5 and supertokens-auth-react 0.15.5
Problem
After a new user has successfully signed up and verified their email address, I need to redirect them to an onboarding route where I collect demographic data. Upon clicking on the email verification link and then clicking 'Continue' on the 'Email verification successful!' pop-up, the getRedirectionURL callback is called with context.action === "SUCCESS", but context.isNewUser === false, so I am not able to detect when a new user logs in for the first time.
How to Reproduce
I am using the following example callback:
SuperTokens.init({
appInfo: {...},
recipeList: [
EmailPassword.init({
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS" && context.isNewUser) {
if (context.redirectToPath !== undefined) {
// we are navigating back to where the user was before they authenticated
return context.redirectToPath;
}
return "/dashboard";
}
return undefined;
}
}),
Session.init()
]
});
Context
Following the example for detecting when a newly created user account has logged in for the first time in order to redirect the user to an onboarding route, context.isNewUser is always false. https://supertokens.io/docs/emailpassword/advanced-customizations/frontend-hooks/redirection-callback
I am using supertokens-core 3.5 and supertokens-auth-react 0.15.5
Problem
After a new user has successfully signed up and verified their email address, I need to redirect them to an onboarding route where I collect demographic data. Upon clicking on the email verification link and then clicking 'Continue' on the 'Email verification successful!' pop-up, the getRedirectionURL callback is called with context.action === "SUCCESS", but context.isNewUser === false, so I am not able to detect when a new user logs in for the first time.
How to Reproduce
I am using the following example callback: