Electron

Sample Project

Download this sample project 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 Application 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.6/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" />

Note: 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 Front End Quickstarts

You can use any front end 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.

Lock

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

Lock Google

Use Auth0 for FREECreate free Account