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://*.netlify.com/login. Does it now have to be something like file://* or file:///*?

Client ID: QR579kSOEqhOqPAfqjfTPHaz5hJPvEKT

Auth0 lock version: 11.0.1

Callback mismatch

?

Auth0 lock setup

?Auth0 lock setup

2 Likes

What I would do in this case is,

a) Register a callback URL like https://{your-auth0-domain-name}.auth0.com/mobile, 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,

Sahil

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

Hey there!

Sorry for such huge delay in response! We’re doing our best in providing you with best developer support experience out there, but sometimes our bandwidth is not enough comparing to the number of incoming questions.

Wanted to reach out to know if you still require further assistance?