Missing nonce generation for genericOAuth (OIDC compatibility) #2756

Open
opened 2026-03-13 10:18:29 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @micchat on GitHub (Jan 23, 2026).

Is this suited for github?

  • Yes, this is suited for github

When using the genericOAuth plugin, the authorization URL is built without generating or including a nonce parameter.

For OAuth/OIDC providers that require or strongly recommend nonce, this can lead to reduced security or incompatibility with certain providers.

Currently, there is no way to enable nonce generation/configuration in genericOAuth.

Expected Behavior

The genericOAuth plugin should be able to generate and include a nonce parameter when constructing the authorization URL, similar to how state is handled.

Describe the solution you'd like

Add an optional configuration flag to genericOAuth, for example:

nonce?: boolean

Describe alternatives you've considered

Manually appending nonce via custom authorization parameters

Additional context

If there is already an internal mechanism or recommended workaround for handling nonce with genericOAuth, documentation or examples would also be helpful.

Originally created by @micchat on GitHub (Jan 23, 2026). ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. When using the genericOAuth plugin, the authorization URL is built without generating or including a nonce parameter. For OAuth/OIDC providers that require or strongly recommend nonce, this can lead to reduced security or incompatibility with certain providers. Currently, there is no way to enable nonce generation/configuration in genericOAuth. ### Expected Behavior The genericOAuth plugin should be able to generate and include a nonce parameter when constructing the authorization URL, similar to how state is handled. ### Describe the solution you'd like Add an optional configuration flag to genericOAuth, for example: ``` nonce?: boolean ``` ### Describe alternatives you've considered Manually appending nonce via custom authorization parameters ### Additional context If there is already an internal mechanism or recommended workaround for handling nonce with genericOAuth, documentation or examples would also be helpful.
GiteaMirror added the enhancement label 2026-03-13 10:18:29 -05:00
Author
Owner

@micchat commented on GitHub (Feb 4, 2026):

Is genericOAuth intentionally non-OIDC-compliant, or would supporting optional nonce be acceptable?

@micchat commented on GitHub (Feb 4, 2026): Is genericOAuth intentionally non-OIDC-compliant, or would supporting optional nonce be acceptable?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2756