Docs

Get Management API Tokens for Single-Page Applications

Lock for Android v1 Configuration

Versionv1

This document covers an outdated version of Access TokenLock for Android. We recommend you to upgrade to v2.

These are options that can be used to configure Lock for Android v1 to your project's needs.

Limitations

Lock

Available scopes and endpoints

Lock Constants

Action sent in LocalBroadcastManager when a user authenticates. It will include an instance of UserProfile and Token.

Name of the parameter that will include user's profile

Name of the parameter that will include user's token information

Action sent when the user navigates back closing LockActivity or LockSMSActivity

Action sent when the user change its password

Using a Management API Token to call the Management API from a SPA

Lock Properties

Forces Lock to use an embedded android.webkit.WebView and by default is false.

Lock will login the user after a successful sign up. By default is true

Allows Lock activities to be closed by pressing back button. Default is false

Lock will ask for the user's email instead of a username. By default is true.

Map with parameters that will be sent on every authentication request with Auth0 API.

Tells Lock to use the connections whose name is included in the list. By default the list is null or empty which means that all enabled connections in your application will be used.

Lock will use the Database Connection whose name matches the one provided. By default its null, which means it will pick the first of the list.

If Lock's activities should be displayed in Fullscreen. Default is false

1. Retrieve a Management API Token

Lock Methods

Change the default identity provider handler for Social and Enterprise connections. By default all social/enterprise authentication are done using Web flow with a Browser.

Removes all session information the Identity Provider handlers might have.

Response

Lock.Builder

A simple builder to help you create and configure Lock in your application.

2. Call the Auth0 Management API

Lock.Builder Constants

Key value used by Lock to search in your application's meta-data for the ClientID.

Key value used by Lock to search in your application's meta-data for tenant name.

Key value used by Lock to search in your application's meta-data for domain Url.

Key value used by Lock to search in your application's meta-data for configuration Url.

Keep reading

Lock.Builder Methods

Set the clientId of your application in Auth0. This value is mandatory.

Set the tenant name of your application. This value is optional if you supply a domain url.

Set the domain Url for Auth0's API. This value is optional if you provide a tenant name, it will default to Auth0 cloud API https://tenant_name.auth0.com.

Set the Url where Lock fetches the App configuration. By default it asks Auth0 for this info.

Make Lock use an embedded WebView for Social+Enterprise authentications.

Allow the user to close Lock's activity by pressing back button.

After a successful sign up of a user, sign him/her in too.

Extra parameters sent to Auth0 Auth API during authentication. By default it has JSON Web Tokens (JWTs)scope defined as openid offline_access and a device name stored in device parameter key. For more information check out our documentation on sending authentication parameters

Lock will ask for an email for authentication, otherwise it will ask for a username. By default is true.

Make Lock pick these connections for authentication from all the enabled connections in your app.

Make Lock use the Database Connection whose name matches the one provided.

Load ClientID, Tenant name, Domain and configuration URLs from the Android app's metadata (if available). These are the values that can be defined and it's keys:

  • com.auth0.lock.client-id: Application's clientId in Auth0.
  • com.auth0.lock.tenant: Application's owner tenant name. (Optional if you supply Domain and Configuration URLs)
  • com.auth0.lock.domain-url: URL where the Auth0 API is available. (Optional if you supply ClientID/Tenant and you use Auth0 in the cloud)
  • com.auth0.lock.configuration-url: URL where Auth0 apps information is available. (Optional if you supply ClientID/Tenant and you use Auth0 in the cloud)

Make Lock's activities fullscreen. Default is false

Creates a new instance of Lock and configure it with the values passed to the builder.