Skip to content

fix: Refactor Bitbucket Cloud's OAuth2 host provider to support rotating refresh tokens - #2429

Draft
danielrfraser wants to merge 1 commit into
git-ecosystem:mainfrom
danielrfraser:dfraser/refactor-bitbucket-cloud-oauth-behaviour
Draft

fix: Refactor Bitbucket Cloud's OAuth2 host provider to support rotating refresh tokens#2429
danielrfraser wants to merge 1 commit into
git-ecosystem:mainfrom
danielrfraser:dfraser/refactor-bitbucket-cloud-oauth-behaviour

Conversation

@danielrfraser

Copy link
Copy Markdown

Updates the BitbucketHostProvider to retrieve (and store) refresh credentials using the request.UserName in all cases.

Why?

Bitbucket Cloud is moving to rotating refresh tokens. These refresh tokens expire ~10 minutes after their first usage. The existing code (when running through the refresh token flow) would store the refresh_token against the the remoteUri.GetUserName() however - the remoteUri was built keeping the username intact.

public Uri GetRemoteUri(bool includeUser = false)

The initial authorize flow however

Fixes: #2428

…ting refresh tokens by always storing refresh tokens and access tokens against the configured git username
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.

An upcoming Bitbucket OAuth2 change will break the GCM on Windows when using the default wincredman credentialStore

1 participant