You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Configuration.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,8 @@ Usage of openvpn-auth-oauth2:
76
76
oauth2 issuer (env: CONFIG_OAUTH2_ISSUER)
77
77
--oauth2.nonce
78
78
If true, a nonce will be defined on the auth URL which is expected inside the token. (env: CONFIG_OAUTH2_NONCE) (default true)
79
+
--oauth2.refresh-nonce value
80
+
Controls nonce behavior on refresh token requests. Options: auto (try with nonce, retry without on error), empty (always use empty nonce), equal (use same nonce as initial auth). (env: CONFIG_OAUTH2_REFRESH__NONCE) (default auto)
79
81
--oauth2.pkce
80
82
If true, Proof Key for Code Exchange (PKCE) RFC 7636 is used for token exchange. (env: CONFIG_OAUTH2_PKCE) (default true)
Some OIDC providers may generate new refresh tokens or behave unexpectedly during non-interactive refresh requests. If you experience issues where refresh tokens are invalidated or users need to re-authenticate frequently, you can adjust the nonce behavior using the `oauth2.refresh-nonce` parameter:
69
+
70
+
-`auto` (default): Try with nonce, retry without nonce on error
71
+
-`empty`: Always use empty nonce for refresh requests
72
+
-`equal`: Use the same nonce as initial authentication
73
+
74
+
For providers like Authentik that return empty nonces on refresh (per OIDC spec), use `refresh-nonce: empty` to avoid retry logic that could invalidate refresh tokens.
Copy file name to clipboardExpand all lines: packaging/etc/openvpn-auth-oauth2/config.yaml
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,7 @@
50
50
# ipaddr: false
51
51
# issuer: true
52
52
# nonce: true
53
+
# refresh-nonce: "auto" # Options: auto (try with nonce, retry without on error), empty (always use empty nonce for refresh), equal (use same nonce as initial auth)
0 commit comments