Docs

Lock Objective-C API

Versionv1

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

A0Lock

A0Lock#newLock

Creates a new A0Lock instance using account information from Info.plist file.

A0Lock#newLockWithClientId:domain:

Creates a new A0Lock instance with Auth0 clientId and domain.

A0Lock#newLockWithClientId:domain:configurationDomain:

Creates a new A0Lock instance with Auth0 clientId, domain and configurationDomain.

A0Lock#apiClient

Returns an instance of the API application for Authentication API configured for your application.

A0Lock#newUserAPIClientWithIdToken

Returns a new instance of the API client for Auth0 API with the credentials of a authenticated user obtained from the ID Token

A0Lock#handleURL:sourceApplication:

Handle URL received from AppDelegate when application is called from a third party at the end of an authentication flow.

A0Lock#registerAuthenticators

Register IdP authenticators that will be used for Social & Enterprise connections. By default all Social & Enterprise authentications are performed by using the web flow with Safari but you can plug your own authenticator for a connection (for example, you can register A0FacebookAuthenticator in order to login with FB native SDK).

A0Lock#applicationLaunchedWithOptions

Handle application launched event.

A0Lock#clearSessions

Remove all stored sessions of any IdP in your application. If the user logged in using Safari, those sessions will not be cleaned.

A0LockViewController

A0LockViewController#init

Initialise 'A0LockViewController' using a A0Lock instance.

A0LockViewController#onAuthenticationBlock

Block that is called on successful authentication. It has two parameters profile and token, which will be non-nil unless login is disabled after signup.

A0LockViewController#onUserDismissBlock

Block that is called on when the user dismisses the Login screen. Only when closable property is YES.

A0LockViewController#usesEmail

Enable the username to be treated as an email (and validated as one too) in all Auth0 screens. Default is YES

A0LockViewController#closable

Allows the A0LockViewController to be dismissed by adding a button. Default is NO

A0LockViewController#loginAfterSignup

After a successful Signup, A0LockViewController will attempt to login the user if this property is YES otherwise will call onAuthenticationBlock with both parameters nil. Default value is YES

A0LockViewController#authenticationParameters

List of optional parameters that will be used for every authentication request with Auth0 API. By default it only has 'openid' and 'offline_access' scope values. For more information check out our Wiki

A0LockViewController#signupDisclaimerView

View that will appear in the bottom of Signup screen. It should be used to show Terms & Conditions of your app.

A0LockViewController#useWebView

When the authentication requires to open a web login, for example Linkedin, it will use an embedded UIWebView instead of Safari if it's YES. We recommend using Safari for Authentication since it will always save the User session. This means that if the user is already signed in, for example in Linkedin, and they click on the Linkedin button, it will just work. Default values is NO