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.
Extends the fix added for #293 in PR #1212 to also cover sign out.
For background I believe the same principles regarding
state
for sign in within the linked issue also apply in the sign out case as well. I am working with a multi-tenant system that has a proxy to resolve the actual hostname for the redirect_uri, which also needs to send a signed-out user back to the application start page on the right hostname.Without this fix, I would need to configure every potential hostname as a valid redirect URI in the IDP client config (whilst I think Keycloak can allow wildcards, it's not recommended and others such as Entra ID do not).
This change replicates the concatenated internal opaque state value with a custom
url_state
value and delimiter as used in sign in. Tests have been added to ensure theurl_state
can still be added even if the sign out request does not need to persist any client state.Apologies for not raising an issue first, in tweaking the code to see if it was viable I basically had the PR already written.
Checklist