zitadel/internal/api/grpc/auth
Livio Spring 07b2bac463
fix: allow login with user created through v2 api without password (#8291)
# Which Problems Are Solved

User created through the User V2 API without any authentication method
and possibly unverified email address was not able to login through the
current hosted login UI.

An unverified email address would result in a mail verification and not
an initialization mail like it would with the management API. Also the
login UI would then require the user to enter the init code, which the
user never received.

# How the Problems Are Solved

- When verifying the email through the login UI, it will check for
existing auth methods (password, IdP, passkeys). In case there are none,
the user will be prompted to set a password.
- When a user was created through the V2 API with a verified email and
no auth method, the user will be prompted to set a password in the login
UI.
- Since setting a password requires a corresponding code, the code will
be generated and sent when login in.

# Additional Changes

- Changed `RequestSetPassword` to get the codeGenerator from the
eventstore instead of getting it from query.

# Additional Context

- closes https://github.com/zitadel/zitadel/issues/6600
- closes https://github.com/zitadel/zitadel/issues/8235

---------

Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
2024-07-17 06:43:07 +02:00
..
avatar.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
email_converter.go fix: make user creation errors helpful (#5382) 2023-03-14 19:20:38 +00:00
email.go fix: allow login with user created through v2 api without password (#8291) 2024-07-17 06:43:07 +02:00
idp_converter.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
idp.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
information.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
language.go refactor(fmt): run gci on complete project (#7557) 2024-04-03 10:43:43 +00:00
metadata_converter.go fix(api): correct mapping of metadata queries (#7609) 2024-03-21 14:56:58 +00:00
multi_factor.go fix: allow other users to set up MFAs (#7914) 2024-05-07 05:38:26 +00:00
password_complexity.go feat: remove org (#4148) 2022-11-30 17:01:17 +01:00
password.go fix: check password complexity policy and respect changeRequired on password change (#7884) 2024-05-02 11:50:13 +02:00
passwordless.go fix: allow other users to set up MFAs (#7914) 2024-05-07 05:38:26 +00:00
permission_converter.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
permission.go perf: user grant owner removed (#6962) 2024-01-08 15:26:30 +00:00
phone_converter.go fix: make user creation errors helpful (#5382) 2023-03-14 19:20:38 +00:00
phone.go perf(oidc): optimize the introspection endpoint (#6909) 2023-11-21 13:11:38 +01:00
policy.go feat(auth api): expose login policy of authenticated user (#4979) 2023-01-05 13:04:38 +00:00
profile_converter.go chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
profile.go perf(oidc): optimize the introspection endpoint (#6909) 2023-11-21 13:11:38 +01:00
refresh_token.go fix(current_sequence): no error if not found (#3740) 2022-05-31 11:50:51 +00:00
server.go feat: add SYSTEM_OWNER role (#6765) 2023-10-25 15:10:45 +00:00
user_grant.go chore(console): remove first and lastName fallback from user (#5629) 2023-04-11 15:56:51 +00:00
user.go fix: add OrgIDQuery to the queries for organizations (#8312) 2024-07-16 13:12:19 +00:00