Passwordless SMS & Email Authentication
Lock for iOS v2 Configuration Options
There are numerous options to configure Lock's behavior listed below. In addition, there are also quite a few options available to alter Lock's appearance and style in the Style Customization Options page.
Configuring Lock's behavior
Configuration options can be added to your Lock initialization using
Passwordless in Single-Page Apps
Allows Lock to be dismissed by the user. By default this is
Passwordless in Regular Web Apps
PasswordlessScope used for authentication. By default is
openid. It will return not only the Universal LoginAccess Token, but also an ID Token which is a JSON Web Token (JWT) containing user information. See the documentation on Scopes for more information about authentication scopes.
Passwordless on iOS
offline_access scope in your Lock options will allow a passwordless authenticationRefresh Token to be returned along with the access_token and the id_token. Refresh Tokens can be saved and used to acquire a new Access Token when the old one expires. For more information about using Refresh Tokens for Auth0 authentication, take a look at the reference documentation for the Auth0.Swift SDK, which you would use to implement Refresh Tokens, or at the Swift QuickStart Guide, which provides a comprehensive example of use of Auth0 in Swift development, including the management of Refresh Tokens.
Passwordless on Android
Show Terms of Service
Database connections display the Terms of Service dialog. Default is
true. Note that the Terms of Service will always be shown if the
mustAcceptTerms flag is enabled.
Require users to accept the Terms of Service
Database connection require explicit acceptance of the Terms of Service.
Which database screens will be accessible, the default is enable all screens such as
.Login, .Signup, .ResetPassword.
The first screen to present to the user. The default is
.Login, other options include
Specify the type of identifier the login will require. The default is either:
[.Username, .Email], but it can also accept
[.Email]. However it's important to note that this option is only active if you have set the
requires_username flag to
true in your Auth0 Dashboard
Custom Signup Fields
When signing up the default information requirements are the user's email and password. You can expand your data capture requirements as needed. Capturing additional signup fields here will store them in the
user_metadata, which you can read more about in Metadata. Note that you must specify the icon to use with your custom text field.
There are also configuration options specific to Enterprise connections:
By default Enterprise connections will use Web Authentication. However, you can specify which connections will alternatively use credential authentication and prompt for a username and password.
When in credential authentication mode, should the user require their email as an identifier? The default is
false, and instead requires a username.
Lock provides options to easily turn on and off logging capabilities, as well as adjust other logging related settings.
By default this is
.off, Syslog logging levels are supported.
Whether or not to log Auth0.swift API requests. By default this is
Specify logger output handler, by default this uses the
In the code above, the loggerOutput has been set to use CleanroomLogger. This can typically be achieved by implementing the loggerOutput protocol. You can of course use your favorite logger library. Below is an example of usage handling logger output with CleanroomLogger.