Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sltt-app): clear auth0 cache information on logout #50

Open
ericpyle opened this issue Feb 10, 2025 · 0 comments
Open

feat(sltt-app): clear auth0 cache information on logout #50

ericpyle opened this issue Feb 10, 2025 · 0 comments

Comments

@ericpyle
Copy link
Collaborator

ericpyle commented Feb 10, 2025

Currently: only one user can login to sltt-app. To login a separate user, the user needs to manually uninstall the app

Currently after a user logs in, logs out and then tries to login again, google will assume the same user wants to login whenever auth0 requests google to sign the user in.

So to to clear auth0 cache information on logout

const { session } = require('electron');

const clearBrowserData = (windowId) => {
  session.fromWindow(windowId).clearStorageData({
    origin: 'https://YOUR_AUTH0_DOMAIN'
  }, (error) => {
    if (error) {
      console.error('Error clearing browser data:', error);
    } else {
      console.log('Browser data cleared successfully');
    }
  });
};

// Replace 'YOUR_WINDOW_ID' with the actual window ID
clearBrowserData('YOUR_WINDOW_ID');

const { BrowserWindow } = require('electron');

const reloadWindow = (windowId) => {
  const window = BrowserWindow.fromId(windowId);
  window.reload();
};

// Replace 'YOUR_WINDOW_ID' with the actual window ID
reloadWindow('YOUR_WINDOW_ID');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant