Unable to logout from electron app using Auth0

Currently I’m building an electron js desktop app where I need to implement authentication feature, and I’m using Auth0 for the same. I’m following this article for implementing it. Following all the steps mentioned I’m able to successfully login in my app but as posted in that article I’m not able to get following two things in my app

  1. user profile image, name
  2. also this message"you successfully used openID & auth0 to authenticate"
    so basically they are blank.
    So I’m attaching an image for the same for better understanding.

Up next most importantly when I click on the logout button I’m not able to logout from the app and nothing happens on the click, what I did to troubleshoot this was, I checked “allowed logout URL” in my auth0 dashboard and I’ve given some basic logout URL like this also in my auth-service.js I checked where my tokens were getting cleared (i.e value = null) or not so even they are getting cleared.

My login data is consistent that is when I close and open the app again I’m signed in so that part is working good also in the auth0 logs I’m able to see the person, time & mode(google auth0) who has logged in.

So the main problem is for logout process in my electron app.
Thank you !

Hi @ShubhamMetkar, welcome to the Auth0 Community!

Regarding your issues with Electron, I have an initial caveat: the article you mentioned has been tested with Electron 9, so I’m not sure it is still valid with newer versions of Electron.

Did you try to download and run the accompanying sample app?

Since you are not able to see your profile image, name, and the welcome message, but you say you are authenticated, I guess it is an issue in the JavaScript code. Did you check if you have any JavaScript errors?

Maybe the logout issue may be a consequence of these initial issues.

In your last sentence, you mentioned you are using a Google account to authenticate (“in the auth0 logs I’m able to see the person, time & mode(google auth0)”).
This makes me think about the possible real cause of all your problems. Google imposed some restrictions on the authentication performed in embedded browsers, like the one used in this Electron application.
To learn more, read this document.
A possible solution is outlined here, but with some caveats.

I hope I’ve given you helpful directions.


Hello @andrea.chiarelli sir, Thank you so much for the detailed solution over this issue, so I cloned & ran accompanying sample app and things are working fine with correct logs in the dashboard. I suppose your point regarding this auth0 implementation with electron version upto 9 might be right, because so far I was using version 16, so I’ll also test with higher version & will let you know how it works !
Thanks again :slight_smile:

P.S: I can see only previous day to latest logs in the dashboard and not the older ones, so I guess in the free trial they provide these much of logs only, when I’ll create paid account then auth0 will provide me logs since the account creation time am I right?

Happy to hear it worked with the older version of Electron. Good luck with your experiments with a recent one.

Regarding the logs, yes, you are right: it depends on your free/starter plan.
For more information on the log data retetion policies, check out this document.

1 Like

ohkay, got it, thank you !

Thanks Andrea for helping on this one!

1 Like

I tried with the recent ones (i.e version ^17.1.0) but it’s not working.

Sorry for this @ShubhamMetkar. Unfortunately, currently we don’t have any sample projects with recent versions of Electron


okay sir, no problem.

1 Like