Skip to content

Dont try to use expired refresh tokens - #7445

Merged
joehan merged 1 commit into
masterfrom
jh-fix-reauth
Jul 12, 2024
Merged

joehan merged 1 commit into
masterfrom
jh-fix-reauth

Conversation

@joehan

@joehan joehan commented Jul 12, 2024

Copy link
Copy Markdown
Member

Description

Fixes #7442

Testing

  • Built VSCode and verified that credentials from 'firebase login' were correctly picked up and the project picker worked correctly.
  • Tested auth from the CLI with an expired refresh_token and verified that firebase logout does not fail with 'run firebase login --reauth'

@joehan
joehan requested review from aalej and hlshen July 12, 2024 20:19
@joehan
joehan enabled auto-merge (squash) July 12, 2024 20:26
account &&
account.user.email === optionsUser.email &&
account.tokens.access_token === optionsTokens.access_token // TODO: check if this is necessary
account.tokens.refresh_token === optionsTokens.refresh_token // Should check refresh token which is consistent, not access_token which is short lived.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ nice find

// - we are using tokens from configstore (aka those set by firebase login), AND
// - we are calling CLI code that skips Command (where we normally call this)

setAccessToken(await getAccessToken());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh this is a cleaner solution. Thanks for fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tool commands 'logout' and 'login --reauth' fail when credentials are expired in [email protected]

2 participants