Skip to content

Conversation

@gysel
Copy link
Contributor

@gysel gysel commented Nov 20, 2025

This is a follow up for #1933 and fixed the session refresh for providers that don't renew the ID token.

Description

  • s.Refreshed was always false as the session object was not updated in redeemRefreshToken()
  • ValidateURL is, by default, not configured for OIDC providers. Access token validation should only happen when a validation endpoint is available.

Motivation and Context

How Has This Been Tested?

I started the application in the debugger and validated the refresh flow with and without a configured validate_url against a Keycloak IdP.

Checklist:

  • My change requires a change to the documentation or CHANGELOG.
  • I have updated the documentation/CHANGELOG accordingly.
  • I have created a feature (non-master) branch for my PR.
  • I have written tests for my code changes.

@tuunit tuunit changed the title Fix session refresh handling in OIDC provider fix: session refresh handling in OIDC provider Jan 14, 2026
gysel added 2 commits January 14, 2026 23:13
- `s.Refreshed` was always `false` as the session object was not updated
- `ValidateURL` is, by default, not configured for OIDC providers. Access token validation now only happens when a validation endpoint is available.

Signed-off-by: Michael Gysel <michael.gysel@unblu.com>
Signed-off-by: Michael Gysel <michael.gysel@unblu.com>
@tuunit tuunit force-pushed the bugfix/oidc-refresh-validation branch from 825d799 to 174621f Compare January 14, 2026 22:13
@tuunit tuunit merged commit 4953603 into oauth2-proxy:master Jan 14, 2026
4 checks passed
sourava01 pushed a commit to sourava01/oauth2-proxy that referenced this pull request Jan 15, 2026
* Fix session refresh handling in OIDC provider

- `s.Refreshed` was always `false` as the session object was not updated
- `ValidateURL` is, by default, not configured for OIDC providers. Access token validation now only happens when a validation endpoint is available.

Signed-off-by: Michael Gysel <michael.gysel@unblu.com>

* Update changelog

Signed-off-by: Michael Gysel <michael.gysel@unblu.com>

---------

Signed-off-by: Michael Gysel <michael.gysel@unblu.com>
pierluigilenoci pushed a commit to pierluigilenoci/oauth2-proxy that referenced this pull request Jan 15, 2026
* Fix session refresh handling in OIDC provider

- `s.Refreshed` was always `false` as the session object was not updated
- `ValidateURL` is, by default, not configured for OIDC providers. Access token validation now only happens when a validation endpoint is available.

Signed-off-by: Michael Gysel <michael.gysel@unblu.com>

* Update changelog

Signed-off-by: Michael Gysel <michael.gysel@unblu.com>

---------

Signed-off-by: Michael Gysel <michael.gysel@unblu.com>
Signed-off-by: Pierluigi Lenoci <pierluigi.lenoci@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants