Repository navigation
Conversation
…ssion ends
Keycloak 26.4-26.8 refuses a DPoP-bound refresh token on /protocol/openid-connect/logout
("DPoP proof is missing", even with a proof: TokenManager.verifyRefreshToken reads a proof only
the token endpoint parses). CredentialsManager.logout() logged that and cleared local state, so
the server session lived on. It now revokes DPoP-bound refresh tokens (with a proof), which ends
the session; Bearer sessions keep using the logout endpoint. revoke and logout send a proof when
the SDK has a key. DPoPLogoutIT records the server behavior; it fails once Keycloak fixes /logout.
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.
Found while building the web SDK (#44, spec/22 §5).
Bug. With DPoP on (the default),
CredentialsManager.logout()on iOS and Android cleared local state but left the Keycloak session alive. Keycloak 26.4–26.8 refuses a DPoP-bound refresh token on/protocol/openid-connect/logoutwithinvalid_grant: DPoP proof is missing, even when a proof is sent:TokenManager.verifyRefreshTokenreads a session attribute that only the token endpoint sets. The SDKs sent no proof and logged the failure as a warning. React Native and Flutter inherit the native behavior.Fix. Sign-out revokes a DPoP-bound refresh token (with a proof); revocation ends the session. Bearer sessions keep using the logout endpoint.
Tokens.revokeandTokens.logoutnow send a proof whenever the SDK has a key.Tests.
DPoPLogoutIT(Keycloak 26.8.1): logout with a proof is refused and the session survives; revoke with a proof ends it. It will fail once Keycloak fixes/logout, telling us we can go back to it.CredentialsAndTokensTest.logoutRevokesADPoPBoundRefreshToken; existing replay tests pass. Swift core builds.