Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit02ac993

Browse files
committed
WIP
1 parent29d1a13 commit02ac993

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

‎src/commands.ts‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,17 @@ export class Commands {
481481
thrownewError("You are not logged in");
482482
}
483483

484+
awaitthis.forceLogout();
485+
}
486+
487+
publicasyncforceLogout():Promise<void>{
488+
if(!this.contextManager.get("coder.authenticated")){
489+
return;
490+
}
491+
this.logger.info("Logging out");
492+
484493
// Check if using OAuth
494+
// TODO maybe just add this check inside oauthSessionManager
485495
consthasOAuthTokens=awaitthis.secretsManager.getOAuthTokens();
486496
if(hasOAuthTokens){
487497
this.logger.info("Logging out via OAuth");
@@ -495,15 +505,6 @@ export class Commands {
495505
}
496506
}
497507

498-
// Continue with standard logout (clears sessionToken, contexts, etc)
499-
awaitthis.forceLogout();
500-
}
501-
502-
publicasyncforceLogout():Promise<void>{
503-
if(!this.contextManager.get("coder.authenticated")){
504-
return;
505-
}
506-
this.logger.info("Logging out");
507508
// Clear from the REST client. An empty url will indicate to other parts of
508509
// the code that we are logged out.
509510
this.restClient.setHost("");

‎src/extension.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
146146
consturl=mementoManager.getUrl();
147147
if(url){
148148
constcliManager=serviceContainer.getCliManager();
149-
// TODO label might not match?
149+
// TODO label might not match the one in remote?
150150
awaitcliManager.configure(toSafeHost(url),url,token);
151151
output.debug("Updated CLI config with new token");
152152
}

‎src/oauth/sessionManager.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,8 @@ export class OAuthSessionManager implements vscode.Disposable {
382382
/**
383383
* Handle OAuth callback from browser redirect.
384384
* Validates state and resolves pending authorization promise.
385+
*
386+
* // TODO this has to work across windows!
385387
*/
386388
handleCallback(
387389
code:string|null,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp