Build your own UI


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

Sample Project

Download a sample project specific to this tutorial configured with your Auth0 API Keys.

Otherwise, if you already have an existing application, please follow the steps below.

  1. Add the following dependencies to your project using Cocoapods:
  1. Open your app's Info.plist file and add two new entries Auth0ClientId and Auth0Domain with the following values YOUR_CLIENT_ID and YOUR_DOMAIN

  2. Create a new instantiate of A0Lock and store it where is easily accessible:

  1. When you need to login your user with email/password credentials, just paste the following code

More details about the parameters you can use check this wiki page.

After that, you may want to save the user's token to be able to use them later, you can find how to do it here.

Social Authentication

  1. In your AppDelegate method named application:didFinishLaunchingWithOptions add the following line:
  1. Also add the following lines to your AppDelegate too
  1. Configure Facebook Native Integration

You need to configure your iOS App for Facebook, please check this guide for more information.

  1. Configure Twitter Native Integration
  1. Authenticate with a social connection