Skip to content

Commit b1df1e0

Browse files
committed
Add support for custom state and nonce parameters in OAuth2 authorization
- Add optional state parameter support to OAuth2Provider constructor - Add optional nonce parameter support to OAuth2Provider constructor - Use custom state parameter if provided, otherwise generate UUID (maintains backward compatibility) - Include nonce parameter in authorization URL when provided - Both parameters are properly URL-encoded for security This enables developers to: - Pass custom state values for enhanced CSRF protection - Include nonce parameter for OpenID Connect ID token verification - Maintain existing behavior when parameters are not provided Note: The existing commented-out state verification code in _OpenBrowserForAuthorisation should be uncommented and updated to properly validate returned state parameters.
1 parent 9853907 commit b1df1e0

File tree

1 file changed

+242
-229
lines changed

1 file changed

+242
-229
lines changed

0 commit comments

Comments
 (0)