iOS Swift Multifactor Authentication
Download this sample project configured with your Auth0 API Keys.
- CocoaPods 1.1.1
- Version 8.2 (8C38)
- iPhone 6 - iOS 10.2 (14C89)
Enable Multifactor Authentication In Your Account
Multifactor authentication can be enabled with the flip of a switch with Auth0. Go to the MFA section of your dashboard and flip the switch on for Google Authenticator under the Choose a Provider section.
You must specify which clients you want to enable MFA for. This can be done by editing the snippet that appears below, replacing the placeholder with your actual client IDs.
If you want to use MFA in all of your clients, the easiest you can do is disabling this conditional in the script:
if (CLIENTS_WITH_MFA.indexOf(context.clientID) !== -1)
For more information on how to configure Lock in your app, take a look at the login tutorial.