I can't find a way to select which screen is to be shown when the Auth0 dialog comes up.
The lock SDK has a withOptions
method with a initialScreen
option for this specific use case https://auth0.com/docs/libraries/lock-ios/v2/configuration#initialscreen, but there doesn't seem anything for the WebAuth variant.
Parameters looked promising, https://auth0.com/docs/libraries/lock-ios/v1/sending-authentication-parameters, but none of that is actually related to the UI.
Code is fairly straightforward:
Auth0
.webAuth(clientId: clientId, domain: domain)
.scope("openid offline_access")
.audience(audienceURL)
.start { result in
// react on the result...
}
Using Swift 4.2, Auth0 1.0
I have used Auth0 in web projects only so far, however, it is very important that you don't mix up the concepts of Auth0's Lock, SDK and API here.
While Lock uses the already implemented and hardly customizable default views of Auth0, the SDK including WebAuth provides the possibility to customize views extensively via defining options in your Auth0 account and sending them alongside with your http requests. See Auth0 - Choose Technology for more information.
I would recommend you to follow the Auth0 Universal Login approach. Create your custom templates with custom options and send those options alongside with your request using WebAuth. As a guideline you could follow this Tutorial - Auth0 QuickStart iOS Login.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With