fix(coderd/oauth2provider): support client_secret_basic client auth (#21793)

This commit is contained in:
Thomas Kosiewski
2026-02-02 16:01:33 +01:00
committed by GitHub
parent 09453aa5a5
commit dd6aec04d7
6 changed files with 216 additions and 8 deletions
+7
View File
@@ -329,6 +329,13 @@ func extractOAuth2ProviderAppBase(db database.Store, errWriter errorWriter) func
paramAppID = r.Form.Get("client_id")
}
}
if paramAppID == "" {
// RFC 6749 §2.3.1: confidential clients may authenticate via
// HTTP Basic where the username is the client_id.
if user, _, ok := r.BasicAuth(); ok && user != "" {
paramAppID = user
}
}
if paramAppID == "" {
errWriter.writeMissingClientID(ctx, rw)
return