jbreckmckye / electron-auth0-login

Helper widget for Auth0 authentication in Electron desktop apps
MIT License
27 stars 19 forks source link

logout() #10

Closed smunx closed 3 years ago

smunx commented 4 years ago

I am calling the logout() while closing the app. But the next time again when I open the app it is not asking for a login. The logout() should remove the the all the token data right ? I have also set the useRefreshTokens: true

Thanks,

jbreckmckye commented 4 years ago

Yes, it should do. The only way it wouldn't is if something went wrong calling node-keytar - here's the source of the logout method:

 public async logout() {
        this.tokenProperties = null;
        if (this.useRefreshToken) {
            await keytar.deletePassword(this.config.applicationName, 'refresh-token');
        }
    }

What version of keytar (and the plugin) are you using? Can you share your package.json?

smunx commented 4 years ago

Yes I am using the keytar plugin and the version is 5.1.0. My package.json is very basic. The only other package I have is electron (6.0.9).

jbreckmckye commented 4 years ago

Are any errors logged when you call logout()?

ianjennings commented 4 years ago

I've noticed that node-keytar is no longer available via npm and has been renamed keytar.

jbreckmckye commented 4 years ago

@ianjennings Okay, I might have time to release a new version this week. Or I can accept a PR with an updated dependency.

jbreckmckye commented 3 years ago

Docs are updated to say keytar instead of node-keytar. Sorry I forgot about this.