Skip to content

OAuth PKCE authentication requires divulging client secret #17107

Closed
@adroitwhiz

Description

@adroitwhiz

While Gitea supports PKCE as an OAuth provider, it doesn't allow clients to authenticate without providing a client secret. Clients which cannot safely store a client secret, e.g. serverless single-page apps and mobile apps, thus cannot authenticate. In particular, Netlify's authentication flow is done entirely client-side, and its OAuth PKCE authentication flow thus will not work with Gitea currently.

My current proposal for fixing this is to add a configuration option for OAuth applications which determines whether their clients are public or confidential. Public clients will be required to use PKCE but are not required to provide a client secret, whereas confidential clients will be required to provide a client secret but are not required to use PKCE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementAn improvement of existing functionalitytype/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions