# Log Users Out of Applications in electron js

**URL:** <https://community.auth0.com/t/log-users-out-of-applications-in-electron-js/49341>\
**Category:** Get Help\
**Tags:** electron, logout\
**Created:** [September 7, 2020, 9:52am UTC](https://community.auth0.com/t/log-users-out-of-applications-in-electron-js/49341 "2020-09-07T09:52:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atul](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/atul/32/12714_2.png) [@Atul](https://community.auth0.com/u/Atul)\
**Post date:** [September 7, 2020, 9:52am UTC](https://community.auth0.com/t/log-users-out-of-applications-in-electron-js/49341/1 "2020-09-07T09:52:37Z")

</div>

How to Log Users Out of Applications in electron js?

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [September 7, 2020, 12:14pm UTC](https://community.auth0.com/t/log-users-out-of-applications-in-electron-js/49341/2 "2020-09-07T12:14:02Z")

</div>

Hey there!

Have you had a chance to check out this blog article from us?

> **[Build and Secure an Electron App - OpenID, OAuth, Node.js, and Express](https://auth0.com/blog/securing-electron-applications-with-openid-connect-and-oauth-2/)**
>
> Learn how to secure an Electron application with OpenID Connect and OAuth 2.0. How to build an Electron app and a RESTful API with Node.j...

Here you’ll find more information about that.

---

<div class="post-metadata">

**Author:** ![Atul](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/atul/32/12714_2.png) [@Atul](https://community.auth0.com/u/Atul)\
**Post date:** [September 7, 2020, 1:14pm UTC](https://community.auth0.com/t/log-users-out-of-applications-in-electron-js/49341/3 "2020-09-07T13:14:22Z")

</div>

Thanks for the reply . I have 2 electron applications running on my local machine and as per article i have implemented auth0 in both apps and used same env-variables.json file in both applications.  
On logout from my first application it deletes all tokens from my machine , when i open my second application it doesn’t get refresh token and it goes to create auth0 window.  
But loadTokens method gets called automatically from webRequest.onBeforeRequest because url contains code query parameter([http://localhost/callback?code=pGgrRpkkMmSKls36](http://localhost/callback?code=pGgrRpkkMmSKls36)). How can i delete all sessions on logout so my second application open auth0 window when there is no refresh token available.
