Hi @fgonzalez
With the Universal Login it uses the Auth0 Lock widget so any configuration options available for the Lock widget can be set using the Auth0 Management dashboard under the Hosted Pages section.
In there you can pass extra config parameters inside the javascript. The particular config parameter you are after is initialScreen
.
Now to pass a value to this parameter from the client side you’ll have to customize the Universal Login to load the value from the extraParams
object, e.g.
var lock = new Auth0Lock(config.clientID, config.auth0Domain, {
...
initialScreen: config.extraParams.initialScreen || 'login'
...
}
and then in your Swift code where you do your webAuth()
call you’ll add an extra setting called parameters, e.g.
Auth0
.webAuth()
.parameters(["initialScreen": "signUp"])
.audience("https://{YOUR_AUTH0_DOMAIN}/userinfo")
.start { result in
switch result {
case .success(let credentials):
print("Obtained credentials: \(credentials)")
case .failure(let error):
print("Failed with \(error)")
}
}
Hope this helps!