fix(auth): align OAuth metadata discovery ordering (#887)

This commit is contained in:
King Star 2026-06-22 23:34:18 +08:00 • committed by GitHub
commit 3c5ce2b0d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1508,7 +1508,7 @@ impl AuthorizationManager {
push_candidate("/.well-known/oauth-authorization-server".to_string());
push_candidate("/.well-known/openid-configuration".to_string());
} else {
// Path components present: follow spec priority order
// Path components present: prefer OAuth discovery before OpenID Connect fallbacks.
// 1. OAuth 2.0 with path insertion
push_candidate(format!("/.well-known/oauth-authorization-server/{trimmed}"));
// 2. OpenID Connect with path insertion