zitadel/internal/user/repository/view/model
Livio Spring 0af37d45e9
fix: handle user remove correctly in v1 sessions for login (#8432)
# Which Problems Are Solved

In case a user was deleted and recreated with the same id, they would
never be able to authenticate through the login UI, since it would
return an error "User not active".
This was due to the check in the auth request / session handling for the
login UI, where the user removed event would terminate an further event
check and ignore the newly added user.

# How the Problems Are Solved

- The user removed event no longer returns an error, but is handled as a
session termination event.
(A user removed event will already delete the user and the preceding
`activeUserById` function will deny the authentication.)

# Additional Changes

Updated tests to be able to handle multiple events in the mocks.

# Additional Context

closes https://github.com/zitadel/zitadel/issues/8201

Co-authored-by: Silvan <silvan.reusser@gmail.com>
2024-08-15 05:39:54 +00:00
..
refresh_token_query.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
refresh_token.go fix(login): improve auth handlers (#7969) 2024-05-22 15:26:02 +00:00
token_query.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
token.go fix(login): improve auth handlers (#7969) 2024-05-22 15:26:02 +00:00
user_query.go feat: remove org (#4148) 2022-11-30 17:01:17 +01:00
user_session_query.go feat: remove org (#4148) 2022-11-30 17:01:17 +01:00
user_session_test.go fix(oidc): IDP and passwordless user auth methods (#7998) 2024-05-28 08:59:49 +00:00
user_session.go fix: handle user remove correctly in v1 sessions for login (#8432) 2024-08-15 05:39:54 +00:00
user_test.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
user.go fix(login): improve auth handlers (#7969) 2024-05-22 15:26:02 +00:00