JavaScript Customizing Lock

Sample Project

Download this sample project configured with your Auth0 API Keys.

Using Lock is easy, but you may want to customize your login UI. For that, there are several customization options available.

Lock Options

Some UI customization can be done via the options parameter when creating a Auth0Lock instance.

Theme Options

You can set custom theme properties, such as a different logo or primary color, by adding a theme property with custom values.

// app.js

var lock = new Auth0Lock('YOUR_CLIENT_ID', 'YOUR_AUTH0_DOMAIN', {
  theme: {
    logo: "test-icon.png",
    primaryColor: "#b81b1c"
  }
});

For more information, see the theming options.

Language Dictionary Specification

You can also customize the text that Lock will display with the languageDictionary option parameter.

// app.js

var lock = new Auth0Lock('YOUR_CLIENT_ID', 'YOUR_AUTH0_DOMAIN', {
  languageDictionary: {
    title: "My Company"
  }
});

For more information, see language dictionary specification.

Use Auth0 for FREECreate free Account