How do I redirect to the sign up or forgot password page using React Native Auth 0?

New to Auth0. After following the setup guide for a React Native Expo application, I’m using the hook ‘useAuth0’ and extracting the function ‘authorize’ to trigger Log In’s (like the guide says). Online it says to use the property ‘screenHint/screen_hint’ in order to redirect but that does not exist on ‘authorize’.

Essentially I want a button that says Sign Up and the button directs to the Sign Up page, not the Log In like it does on default. Is that possible and how would I implement that using the ‘authorize’ function?

Hi @dongantt, and welcome to the Auth0 Community!

I understand you want to redirect users to the Sign Up page when they click a “Sign Up” button using the authorize function from the useAuth0 hook. The reason the screen_hint parameter might not seem to exist directly on the authorize function’s options is that the auth0-react-native SDK handles specific OAuth parameters through a property called additionalParameters. I will give you an example of how to build your options for the authorize function:

await authorize({
        additionalParameters: {
          screen_hint: 'signup'
        }
});

Please let me know if there is more I can do to help you!

Sincerely,
Teodor.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.