Hello! I am using required email validation with ...
# support-questions-legacy
a
Hello! I am using required email validation with ThirdPartyEmailPassword. How can I redirect a new user to a NewUserPage ("/signup") upon successful verification of their email? I found this page (https://supertokens.com/docs/thirdpartyemailpassword/pre-built-ui/auth-redirection#change-redirection-path-post-login), but I'm still being redirected Home upon successful verification. Here is the relevant snipit from my .init on my frontend (react):
Copy code
getRedirectionURL: async (context) => {
                if (context.action === "SUCCESS") {
                    // https://supertokens.com/docs/thirdpartyemailpassword/advanced-customizations/frontend-hooks/redirection-callback
                    if (context.redirectToPath !== undefined) {
                        // console.log("undefined redirecting to path: " + context.redirectToPath)
                        // we are navigating back to where the user was before they authenticated
                        return context.redirectToPath;
                    }
                    if (context.isNewPrimaryUser) {
                        // console.log("new primary user")
                        // user signed up
                        return "/signup";
                    } else {
                        // console.log("existing user")
                        // user signed in
                    }
                    return "/";
                }
                return undefined;
            }