Securing Electron Applications with OpenID Connect and OAuth2

Hi @Shaggy, I’d need a bit more context in what you are using. I tried simulating your situation and I got it working by:

  1. Setting the Auth0Provider redirectUri to “file://callback” when the app is accessed through Electron (not to disrupt the web flow)
  2. Initiate the login process with the function “loginWithPopup” instead of “loginWithRedirect” in the case of an Electron app
  3. Set the allow callback URLs and allowed logout URLs with the value “file://callback”, plus the web values you probably have set. In my case: “http://localhost:3000,file://callback”
  4. Loaded the static React build files into the Electron webview.

Please let me know if you still have issues after following those steps.

Juan

1 Like