Skip to content

Commit 6b4bc85

Browse files
committed
Avoid the credential validity check leaving a stray web session
1 parent 3a9f36e commit 6b4bc85

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/authenticationProvider.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
import { ServerManagerAuthenticationSession } from "./authenticationSession";
1717
import { globalState } from "./commonActivate";
1818
import { getServerSpec } from "./api/getServerSpec";
19-
import { makeRESTRequest } from "./makeRESTRequest";
19+
import { logout, makeRESTRequest } from "./makeRESTRequest";
2020

2121
export const AUTHENTICATION_PROVIDER = "intersystems-server-credentials";
2222
const AUTHENTICATION_PROVIDER_LABEL = "InterSystems Server Credentials";
@@ -230,6 +230,8 @@ export class ServerManagerAuthenticationProvider implements AuthenticationProvid
230230
await this._removeSession(session.id, true);
231231
return false;
232232
}
233+
// Immediately log out the session created by credentials test
234+
await logout(session.serverName);
233235
}
234236
this._checkedSessions.push(session);
235237
return true;

0 commit comments

Comments
 (0)