Sample Project

Download a sample project specific to this tutorial configured with your Auth0 API Keys.

System Requirements
  • NodeJS 5.0.0
  • Electron 1.4.3
Show requirements

Configure the Callback URL

Go to the Client Settings section in your Auth0 dashboard and make sure that the Allowed Callback URLs field contains the following values:

https://YOUR_AUTH0_DOMAIN/mobile, file:///

Add the Lock Widget

Add Auth0Lock to your index.html file and set the viewport.

<!-- Auth0 Lock script -->
<script src="https://cdn.auth0.com/js/lock/10.24.1/lock.min.js"></script>

<!-- Setting the right viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

Some functionality provided by Lock is meant for regular web browsers. For best results, add auth: { sso: false } to your Lock configuration options.

Follow the frontend Quickstarts

You can use any frontend technology you like in your Electron application. Follow the quickstart guide specific to your use case.

In the simple case of using jQuery, you can provide a control to render the Lock widget which will allow the user to log in.


If the user logs in with a social provider, they will be prompted for their credentials.

Lock Google

Use Auth0 for FREECreate free Account