Skip to content

feat: add oauth2 token exchange #12196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Feb 20, 2024
Merged

feat: add oauth2 token exchange #12196

merged 11 commits into from
Feb 20, 2024

Conversation

code-asher
Copy link
Member

@code-asher code-asher commented Feb 16, 2024

Re-opened since the original got closed by stale bot and will not let me re-open after force-pushing!

Rename token hashed_secret to refresh_hash and later are new since that PR was last reviewed. The main thing is that a secret prefix was added.

#11778

Comment on lines +1236 to +1240
// The user ID is on the API key so that has to be fetched.
key, err := q.db.GetAPIKeyByID(ctx, token.APIKeyID)
if err != nil {
return database.OAuth2ProviderAppToken{}, err
}
Copy link
Member

Choose a reason for hiding this comment

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

That is annoying 😢

@code-asher code-asher force-pushed the asher/oauth2-exchange-db branch from 0204adb to 70cedd6 Compare February 20, 2024 23:13
@code-asher code-asher changed the title feat: add oauth2 codes and tokens to database feat: add oauth2 token exchange Feb 20, 2024
@code-asher code-asher force-pushed the asher/oauth2-exchange-db branch from 7fd123e to da447c2 Compare February 20, 2024 23:21
Without this I think the tests would fail since they are not adding a
prefix and there is no default.
@code-asher code-asher force-pushed the asher/oauth2-exchange-db branch from da447c2 to e517d8e Compare February 20, 2024 23:28
@code-asher code-asher merged commit 4d39da2 into main Feb 20, 2024
@code-asher code-asher deleted the asher/oauth2-exchange-db branch February 20, 2024 23:58
@github-actions github-actions bot locked and limited conversation to collaborators Feb 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants