feat: control sending id_token_hint in OIDC logout URL#2300
Merged
Conversation
includeIdTokenHintInOIDCLogoutUrl option to control PII exposure in logout URLs
tusharpandey13
marked this pull request as draft
September 3, 2025 05:32
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:
|
tusharpandey13
marked this pull request as ready for review
September 3, 2025 05:35
includeIdTokenHintInOIDCLogoutUrl option to control PII exposure in logout URLsid_token_hint in OIDC logout URL
tusharpandey13
marked this pull request as draft
September 10, 2025 12:29
tusharpandey13
marked this pull request as ready for review
September 15, 2025 05:46
nandan-bhat
approved these changes
Sep 15, 2025
nandan-bhat
previously approved these changes
Sep 15, 2025
tusharpandey13
enabled auto-merge
September 16, 2025 06:18
…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
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
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_hintparameter from OIDC logout URLs while maintaining logout functionality.logout_hintandclient_idare sent by default.#2151 is related
References
See OIDC Logout endpoint parameters
📋 Changes
This change adds a new configuration option
includeIdTokenHintInOIDCLogoutUrlto exclude theid_token_hintparameter from logout URLs. Defaultstruefor backward compatibility.Usage:
When set to
false, onlylogout_hint(session ID) andclient_idare included in OIDC logout URLs, preventing PII exposure while maintaining proper logout functionality.src/server/client.ts: AddedincludeIdTokenHintInOIDCLogoutUrlproperty toAuth0ClientOptionsinterface with JSDoc documentationsrc/server/auth-client.ts: Added property toAuthClientOptionsinterface and implemented conditional logic increateOIDCLogoutResponsesrc/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_hintwhen option not specified)truevalue (includesid_token_hint)falsevalue (excludesid_token_hintbut includeslogout_hint)auto,oidc,v2)Manual:
includeIdTokenHintInOIDCLogoutUrl: falselogout_hintbut notid_token_hintid_token_hint