OAuth PKCE authentication requires divulging client secret #17107
Labels
type/enhancement
An improvement of existing functionality
type/proposal
The new feature has not been accepted yet but needs to be discussed first.
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.
The text was updated successfully, but these errors were encountered: