React Native - Direct user to SignUp page

I’ve seen a lot of older posts about using “screen_hint” and setting to “signUp”, and passing that along with the /authorize url as a query param.

However, these old posts all reference parts of the package that aren’t available anymore. I’m just wondering how to do that now with react native? I can’t see anything in the docs that points towards being able to pass that into authorize()

Hey there @ben28 welcome to the community!

Do you mind sharing the specific details around which parts of the package aren’t available anymore? As far as I’m aware, if you are using New Universal Login you should be able to pass the extra param webAuth:

auth0.webAuth.authorize({
  scope: scope,
  login_hint: email,
  screen_hint: 'signup', // 👈🏻
});

Hey @tyf ,

Yeah it was things around using “loginWithRedirect”, which I couldn’t see any reference to in the react native docs.

So I’ve tried doing it this way:

const { authorize } = useAuth0();
const login = async () => {
    await authorize({ screen_hint: 'signup' })
}

That one doesn’t seem to do anything. Also tried similar to how you suggested there:

const auth0 = new Auth0({ domain: 'mydomain', clientId: 'myclientid' })
const login = async () => {
    await auth0.webAuth.authorize({ screen_hint: 'signup' })
}

That doesn’t appear to work either :person_shrugging:

Face the same issue. I managed to do it by adding those parameters to additionalParameters

await authorize({
  additionalParameters: { screen_hint: "signup" }
});
1 Like

Ah @napatworks you’re a star! That was it, thank you :slight_smile:

1 Like

Ah! Great catch, thanks for sharing :heart:

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