React-native-auth0: Open the web authentication screen with "Register" as default

Created on 3 Feb 2020  路  3Comments  路  Source: auth0/react-native-auth0

Describe the problem you'd like to have solved

Our app design may have two separated buttons "Sign In" and "Register" so we need to open the web authentication screen with "Register" as default

All 3 comments

Found the solution..

const authParams = {
      scope: AUTH0_SCOPE,
      audience: Config.AUTH0_CLIENT_AUDIENCE,
      prompt: 'login',
      initialScreen: 'signUp'
}

The solution posted does not work. initialScreen is not a valid property of AuthorizeParams. Is there a way to do this? I would have thought webAuth.authorize({ scope: AUTH0_SCOPE, prompt: 'signup' }) would work, but it doesn't.

For posterity's sake, the solution using the "new" Universal Hosted Login experience is

webAuth.authorize({
  scope: AUTH0_SCOPE,
  screen_hint: 'signup'
})
Was this page helpful?
0 / 5 - 0 ratings