Lock Version 9

This document uses an outdated version of Lock (version 9). Learn how to migrate to version 10, or, if you're new to Lock, start out with the Lock 10 Documentation.

Lock: Initialization

// Initialize with clientID and domain
var lock = new Auth0Lock(clientID, domain);

// Initialize with options
var lock = new Auth0Lock(clientID, domain, options);
  • clientID {String}: Your application clientID in Auth0.

  • domain {String}: Your Auth0 domain. Usually <account>.auth0.com.

  • options {Object}:

    • cdn {String}: Use as CDN base url. Defaults to domain if it doesn't equal *.auth0.com.
    • assetsUrl {String}: Use as assets base url. Defaults to domain if it doesn't equal *.auth0.com.
    • useCordovaSocialPlugins {boolean}: When Lock is used in a Cordova/Phonegap application, it will try authenticating with social connections using a native plugin. The only plugin supported is phonegap-facebook-plugin but more will come soon.