OAuth refresh handler should require client authentication #9676

Closed
opened 2025-11-02 08:46:20 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @hickford on GitHub (Oct 12, 2022).

The OAuth authorization_code handler authenticates the client by validating the client secret 9862936ed3/routers/web/auth/oauth.go (L703-L713)

According to the OAuth spec https://datatracker.ietf.org/doc/html/rfc6749#section-6 , this should also happen when "Refreshing an Access Token"

The authorization server MUST ... require client authentication for confidential clients

but handleRefreshToken doesn't do this 9862936ed3/routers/web/auth/oauth.go (L658)

Originally created by @hickford on GitHub (Oct 12, 2022). The OAuth authorization_code handler authenticates the client by validating the client secret https://github.com/go-gitea/gitea/blob/9862936ed3f488896adb6ddc29eb25ef15185c41/routers/web/auth/oauth.go#L703-L713 According to the OAuth spec https://datatracker.ietf.org/doc/html/rfc6749#section-6 , this should also happen when "Refreshing an Access Token" > The authorization server MUST ... require client authentication for confidential clients but handleRefreshToken doesn't do this https://github.com/go-gitea/gitea/blob/9862936ed3f488896adb6ddc29eb25ef15185c41/routers/web/auth/oauth.go#L658
GiteaMirror added the type/bug label 2025-11-02 08:46:20 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9676