Passwordless in Lock iOS v1


This document covers an outdated version of Lock for iOS. We recommend you to upgrade to v2

This functionality has been deprecated in native. After June 2017, tenants cannot use the native passwordless flow. The functionality will continue to work for tenants that currently have it enabled. If at some point the passwordless mode feature is changed or removed from service, customers who currently use it will be notified beforehand and given ample time to migrate.

Passwordless with SMS

A0SMSLockViewController authenticates without using a password with SMS. In order to be able to authenticate the user, your application must have the SMS connection enabled and configured in your dashboard.

First instantiate A0SMSLockViewController and register the authentication callback that will receive the authenticated user's credentials.

The next step is register a block to return an API Token used to register the phone number and send the login code with SMS. This token can be generated in Auth0 API v2 page, just select the scope create:users and copy the generated API Token.

Finally present it to the user:

And you'll see SMS login screen

Lock SMS Screenshot

Passwordless with Touch ID

Lock provides passwordless authentication with Touch ID for your Auth0 DB connection. To start authenticating your users with Touch ID please follow those steps:

  1. Add TouchID subspec module of Lock to your Podfile
  1. Import Lock's umbrella header

If your are coding in Swift, you need to import the header in your app's Bridging Header.

  1. Instantiate A0TouchIDLockViewController and register authentication callback
  1. Present A0TouchIDLockViewController as the root controller of a UINavigationController

It's mandatory to present A0TouchIDLockViewController embedded in a UINavigationController.

And you'll see TouchID login screen.

Lock Screenshot