feat: multi-feature update

This commit is contained in:
chaos
2026-06-15 06:16:16 +08:00
parent 6f415428d3
commit 04d30f9dd1
58 changed files with 4610 additions and 419 deletions
+8
View File
@@ -90,6 +90,10 @@ func HandleOAuth(c *gin.Context) {
// 5. Exchange code for token
code := c.Query("code")
// Pass PKCE code_verifier to context if present
if codeVerifier := c.Query("code_verifier"); codeVerifier != "" {
c.Set("pkce_code_verifier", codeVerifier)
}
token, err := provider.ExchangeToken(c.Request.Context(), code, c)
if err != nil {
handleOAuthError(c, err)
@@ -136,6 +140,10 @@ func handleOAuthBind(c *gin.Context, provider oauth.Provider) {
// Exchange code for token
code := c.Query("code")
// Pass PKCE code_verifier to context if present
if codeVerifier := c.Query("code_verifier"); codeVerifier != "" {
c.Set("pkce_code_verifier", codeVerifier)
}
token, err := provider.ExchangeToken(c.Request.Context(), code, c)
if err != nil {
handleOAuthError(c, err)