-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Registration flow fixed #23064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Registration flow fixed #23064
Conversation
registration Adding a failing test from keycloak#17644. The keycloak#19488 PR seems not to solve it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @mposolda - I've testing this change and I see that the registration page doesn't show any more, which is a great UX improvement. Looking at the code, it is still checked on submission, so we're extra safe here.
Changes should be squashed once they are merged.
|
@mposolda looks great, thanks for all the changes. One small question though: shouldn't the whole registration flow run in one transaction? If an Exception happens in any "step" (either builtin or custom flow step) of them is it a correct state that we end in? Is there any way to handle rollbacks then? |
|
@ahus1 Thanks! Would you please mind to approve if it looks good to you? @vilmosnagy The default registration flow runs in one transaction by default after click "Register" button AFAIK. Or more accurately, I think that it works like this:
So typically, there is one transaction for each HTTP request. It is possible to re-configure registration flow to involve multiple transactions if administrator decides to add multiple steps under top flow (EG. if he wants something like "wizard" of multiple steps for registering user) and in this case it could be multiple transactions. I think that throwing AuthenticationFlowException doesn't mean rollback of transaction, which is likely also why the user was created in DB. As a follow-up, we can consider throwing an |
Closes keycloak#21514 Co-authored-by: Vilmos Nagy <[email protected]> Co-authored-by: Alexander Schwartz <[email protected]> Co-authored-by: Marek Posolda <[email protected]> (cherry picked from commit 506e253)
Closes #21514 Co-authored-by: Vilmos Nagy <[email protected]> Co-authored-by: Alexander Schwartz <[email protected]> Co-authored-by: Marek Posolda <[email protected]> (cherry picked from commit 506e253)
Thanks, that answer's all my questions. |
Closes #17644
Closes #21514
This is different version of the PR #19556
@ahus1 @sguilhen @vilmosnagy Please see my comment here for the details #19556 (comment)