Prevent parallel login flows after logout#1410
Merged
Conversation
This was referenced Apr 10, 2026
88247a9 to
4a3e72b
Compare
…avigation' context Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
4a3e72b to
2a7b869
Compare
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
…so, redirect to the redirect URL and do nothing Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
CarlSchwan
approved these changes
Apr 17, 2026
CarlSchwan
reviewed
Apr 17, 2026
Comment on lines
+24
to
+28
| if ($request->getHeader('X-Requested-With') === 'XMLHttpRequest') { | ||
| return false; | ||
| } | ||
|
|
||
| return true; |
Member
There was a problem hiding this comment.
Suggested change
| if ($request->getHeader('X-Requested-With') === 'XMLHttpRequest') { | |
| return false; | |
| } | |
| return true; | |
| return $request->getHeader('X-Requested-With') !== 'XMLHttpRequest'); |
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.
Global problem: When the user is logged out (by user_oidc or anything else like integration_swp), user_oidc might try to redirect to the start of an Oidc login flow. This can lead to parallel login flows messing with each other (state mismatch) if all requests are redirected.
This can happen:
allow_multiple_user_backendsis set to 0 and there is only one provider, any request to /login will redirect to theuser_oidc.login.loginroutestore_login_tokenis enabled and a token expires, we reachTokenService::reauthenticatewhich logs out and redirects to thestore_login_tokenSolution in this PR: Only redirect to the login flow when the request comes from a 'navigation' context.
This is an alternative to #1409 which is possibly better.