Lock Version 10

This document uses the latest version of Lock (version 10). If you are still using version 9, check out the Lock 9 to Lock 10 migration guide, or the Lock 9 Documentation.

Using Lock With auth0.js

If you try to use auth0.js along with Lock 10, you will not be able to call getClient(). Instead, you should instantiate an Auth0 object.

If you included the script from the Auth0 CDN or installed Lock from bower, you only need to instantiate the Auth0 object to use it with Lock (see below).

If you installed Lock from npm, you must include auth0-js in your project dependencies and import it. Before instantiating the Auth0 object, you will need to require auth0-js:

var Auth0 = require('auth0-js');

Then, to use auth0.js, simply instantiate a new Auth0 object:

var client = new Auth0({
  domain:       'YOUR_AUTH0_DOMAIN',
  clientID:     'YOUR_CLIENT_ID',
  callbackURL:  '{YOUR APP URL}',
  responseType: 'token'

Lock: Table of Contents