-
Notifications
You must be signed in to change notification settings - Fork 429
feat: control sending id_token_hint
in OIDC logout URL
#2300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
includeIdTokenHintInOIDCLogoutUrl
option to control PII exposure in logout URLs
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2300 +/- ##
==========================================
+ Coverage 85.44% 85.47% +0.02%
==========================================
Files 26 26
Lines 2632 2636 +4
Branches 485 486 +1
==========================================
+ Hits 2249 2253 +4
Misses 377 377
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
includeIdTokenHintInOIDCLogoutUrl
option to control PII exposure in logout URLsid_token_hint
in OIDC logout URL
nandan-bhat
approved these changes
Sep 15, 2025
nandan-bhat
previously approved these changes
Sep 15, 2025
…ntInOIDCLogoutUrl feature - Added federated logout support tests from main branch - Preserved includeIdTokenHintInOIDCLogoutUrl test suite - Both feature sets are now compatible and properly tested
…m/auth0/nextjs-auth0 into bugfix/idtoken-hint-logout-toggle
tanya732
approved these changes
Sep 16, 2025
This was referenced Sep 16, 2025
Add documentation for includeIdTokenHintInOIDCLogoutUrl and middleware url matching strategies
#2324
Merged
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a new boolean configuration option to prevent potential PII exposure by allowing developers to exclude the
id_token_hint
parameter from OIDC logout URLs while maintaining logout functionality.logout_hint
andclient_id
are sent by default.#2151 is related
References
See OIDC Logout endpoint parameters
📋 Changes
This change adds a new configuration option
includeIdTokenHintInOIDCLogoutUrl
to exclude theid_token_hint
parameter from logout URLs. Defaultstrue
for backward compatibility.Usage:
When set to
false
, onlylogout_hint
(session ID) andclient_id
are included in OIDC logout URLs, preventing PII exposure while maintaining proper logout functionality.src/server/client.ts
: AddedincludeIdTokenHintInOIDCLogoutUrl
property toAuth0ClientOptions
interface with JSDoc documentationsrc/server/auth-client.ts
: Added property toAuthClientOptions
interface and implemented conditional logic increateOIDCLogoutResponse
src/server/auth-client.test.ts
: Added comprehensive test suite covering all scenarios including default behavior, explicit true/false values, and edge casessrc/server/logout-strategy.flow.test.ts
: Added integration tests verifying the option works correctly with different logout strategies🎯 Testing
Automated:
Added 7 new unit tests and 3 integration tests covering:
id_token_hint
when option not specified)true
value (includesid_token_hint
)false
value (excludesid_token_hint
but includeslogout_hint
)auto
,oidc
,v2
)Manual:
includeIdTokenHintInOIDCLogoutUrl: false
logout_hint
but notid_token_hint
id_token_hint