feat: control sending id_token_hint
in OIDC logout URL
#2300
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