Auth0 Home Blog Docs

Auth0 Electron Callback URL mismatch



I can’t seem to get file:/// to work with our Electron app. I was able to get things working by adding the full callback file:/// url into the Allowed Callback URLs setting. The callbacks work just fine on the web using the callback with https://* Does it now have to be something like file://* or file:///*?

Client ID: QR579kSOEqhOqPAfqjfTPHaz5hJPvEKT

Auth0 lock version: 11.0.1

Callback mismatch

?Callback mismatch

Auth0 lock setup

?Auth0 lock setup


What I would do in this case is,

a) Register a callback URL like https://{your-auth0-domain-name}, file:///
b) Set the callback URL in your code to location.href
c) Use the auth0 lock as follows,

      var lock = new Auth0Lock(AUTH0_CLIENT_ID, AUTH0_DOMAIN, {
    auth: {
      redirect: false,
      sso: false

You can find a full working example here,



Using your samples i receive a 403 and “Origin file:// is not allowed.” error from /co/authenticate. How i can fix this ?