Skip to content

Commit

Permalink
ZETA-8549: Fix access token logic (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlieGreenman authored Apr 9, 2024
1 parent 3cd74fb commit f0568f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/auth/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export async function refreshAccessToken(context: vscode.ExtensionContext, isPro

export async function getAccessToken(context: vscode.ExtensionContext, isProduction: boolean) {
const accessToken = context.globalState.get(MEMENTO_RAZROO_ACCESS_TOKEN) as string;
if (isTokenExpired(accessToken)) {
if(accessToken && isTokenExpired(accessToken)) {
const newToken = await refreshAccessToken(context, isProduction);
return newToken;
}
Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export async function activate(context: vscode.ExtensionContext) {
}
await tryToAuth(context, isProduction, projectsProvider, projectConfigs, orgId);
} catch (error) {
console.log('COMMAND_TRY_TO_AUTH ERROR');
console.log('Connect projects try to auth ERROR');
console.error(error);
}
}
Expand Down

0 comments on commit f0568f9

Please sign in to comment.