Skip to content

OAuth should not require secret for public clients #25047

Closed
@hickford

Description

@hickford

According to OAuth spec https://datatracker.ietf.org/doc/html/rfc8252#section-8.5

it is NOT RECOMMENDED for authorization servers to require client authentication of public native apps clients using a shared secret

but Gitea requires client secret in both authorization code flow and refresh flow regardless of client type

if !app.ValidateClientSecret([]byte(form.ClientSecret)) {

if !app.ValidateClientSecret([]byte(form.ClientSecret)) {

Fix would be to validate secret if and only if app.ConfidentialClient

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions