Skip to content

Commit

Permalink
Fix stored credentials not updating on logout
Browse files Browse the repository at this point in the history
  • Loading branch information
thornbill committed May 13, 2024
1 parent 99f9efd commit 1995393
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/ServerConnections.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class ServerConnections extends ConnectionManager {

Events.on(this, 'localusersignedout', (_e, logoutInfo) => {
setUserInfo(null, null);
// Ensure the updated credentials are persisted to storage
credentialProvider.credentials(credentialProvider.credentials());

if (window.NativeShell && typeof window.NativeShell.onLocalUserSignedOut === 'function') {
window.NativeShell.onLocalUserSignedOut(logoutInfo);
Expand Down Expand Up @@ -128,12 +130,12 @@ class ServerConnections extends ConnectionManager {
}
}

const credentials = new Credentials();
const credentialProvider = new Credentials();

const capabilities = Dashboard.capabilities(appHost);

export default new ServerConnections(
credentials,
credentialProvider,
appHost.appName(),
appHost.appVersion(),
appHost.deviceName(),
Expand Down

0 comments on commit 1995393

Please sign in to comment.