Repository navigation
Registration with email verification - corner case scenario for pre-a… - #48208
Merged
Merged
Conversation
rmartinc
approved these changes
Apr 20, 2026
| return; | ||
| // When triggered during registration, make sure to add requiredAction also to the authSession. If email is later verified in different authSession, this authSession should not continue | ||
| if ("true".equals(context.getAuthenticationSession().getAuthNote(NEW_USER_REGISTERED))) { | ||
| context.getAuthenticationSession().addRequiredAction(UserModel.RequiredAction.VERIFY_EMAIL); |
Contributor
There was a problem hiding this comment.
Nitpick. Maybe just deleting auth session and force to restart the login was better. But this is enough to fix the issue.
Contributor
Author
There was a problem hiding this comment.
Yes, that is another variant I've considered and agree that it is likely better. I've updated PR for restart current authentication session in case that email was verified in other authSession in the meantime. Used separate commit, so it is possible to easily see the changes. Could you re-review?
…ccount takeover closes keycloak#48206 Signed-off-by: mposolda <mposolda@gmail.com>
Signed-off-by: mposolda <mposolda@gmail.com>
mposolda
force-pushed
the
48206-register-verify-email
branch
from
April 20, 2026 09:14
600f7e2 to
6cc7752
Compare
Contributor
Author
|
@rmartinc Thanks! |
Closed
sashyo
pushed a commit
to tide-foundation/keycloak-IGA
that referenced
this pull request
Jul 20, 2026
keycloak#48208) closes keycloak#48206 Signed-off-by: mposolda <mposolda@gmail.com>
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.
…ccount takeover
closes #48206
PR adds new authentication session note
NEW_USER_REGISTEREDin case that user self-registration happens in this authentication session (EG.authSession1) . When verify-email is done in the meantime for the user in different browser (by some different authentication session likeauthSession2), thenauthSession1is not able to continue after verify-email.