Skip to content

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

@ericpyle

Description

@ericpyle

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');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions