Hello community!
I am trying to integrate the auth0 login flow within an electron app (electron v13.1.7). I have followed the corresponding blog post, which is very useful and clear, and manage to implement the login flow for dev/testing ENVs using http://localhost/callback
as the allowed callback.
Moving forward Im trying to get it work with some ENVs which are more close to the users, but I am not confident about using http://localhost/callback
as the allowed callback for the production app.
Is there any approach/way that I can to have a different callback, which can be also to be handled within the electron app? (I have tried something with custom scheme, but couldn’t get to a working result)
Thanks!
Hi @Tikky,
Welcome to the Auth0 Community!
First, I’d like to point out that you will not be able to use http://localhost/callback
as the allowed callback for your production application because this would indicate that your application is locally hosted and only accessible on your local network.
Instead, you might want to consider hosting your application and then using the corresponding URL as the allowed callback in Production.
In regards to using another callback, yes, you can specify the callback URL of your application to the callback URL that you desire.
You may find our Redirect Users explains in further detail the usage of callback URLs helpful.
Please let me know if you have any further questions. I’d be happy to help.
Thank you.
Thanks for the response @rueben.tiow!
Yes, totally agree on what you’ve stated.
But how about in the context of the electron native app, which is basically hosted locally on the user’s machine?
What should be the format of the callback in this case?
Thanks for taking time to address this questions!
Hi @Tikky,
Thank you for your reply!
In the context of the Electron Native App, you could use the following for the Allowed Callback URLs:
https://YOUR_DOMAIN.REGION.auth0.com/mobile, file:///callback
I found a Auth0 Electron Sample detailing these values for the Callback URLs.
Please let me know if there’s anything else I can do to help.
Thank you.
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.