Merged
feat: add best effort attempt to revoke oauth access token in external auth provider#19775
Conversation
ibetitsmike
reviewed
Sep 11, 2025
pawbana
force-pushed
the
oauth-revocation-15575
branch
3 times, most recently
from
September 16, 2025 07:49
e0c6a5e to
8b82266
Compare
pawbana
force-pushed
the
oauth-revocation-15575
branch
from
September 16, 2025 09:10
8b82266 to
3bdda1f
Compare
pawbana
force-pushed
the
oauth-revocation-15575
branch
5 times, most recently
from
September 17, 2025 07:33
78554eb to
93f15d9
Compare
pawbana
force-pushed
the
oauth-revocation-15575
branch
from
September 17, 2025 11:32
93f15d9 to
a14d39f
Compare
Comment on lines
+418
to
+419
| require.Error(t, err) | ||
| require.Contains(t, err.Error(), "token validation failed") |
Member
There was a problem hiding this comment.
You can condense require.Error(); require.Contains(t, err.Error(), msg) into require.ErrorContains(t, err, msg)
pawbana
marked this pull request as ready for review
September 17, 2025 14:54
aslilac
requested changes
Sep 17, 2025
aslilac
approved these changes
Sep 18, 2025
aslilac
left a comment
Member
There was a problem hiding this comment.
frontend looks much better! thanks
matifali
reviewed
Sep 19, 2025
| CODER_EXTERNAL_AUTH_0_TYPE=github | ||
| CODER_EXTERNAL_AUTH_0_CLIENT_ID=xxxxxx | ||
| CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=xxxxxxx | ||
| CODER_EXTERNAL_AUTH_0_REVOKE_URL=https://api.github.com/applications/<CLIENT ID>/grant |
Member
There was a problem hiding this comment.
Should we instead inherit this automatically if type=github.
We use the type to set defaults for known provides.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Solves #15575
Adds OAuth access token revocation when unlinking external auth provider. Due to revocation not being consistently implemented by providers this is only best effort attempt. Unsuccessful revocation won't influence link removal.