mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:07:30 +00:00
fix(login): prevent init mail on idp registration (#7895)
This commit is contained in:
@@ -288,7 +288,7 @@ func (c *Commands) addHumanCommandEmail(ctx context.Context, filter preparation.
|
||||
if human.Email.ReturnCode {
|
||||
human.EmailCode = &emailCode.Plain
|
||||
}
|
||||
return append(cmds, user.NewHumanEmailCodeAddedEventV2(ctx, &a.Aggregate, emailCode.Crypted, emailCode.Expiry, human.Email.URLTemplate, human.Email.ReturnCode)), nil
|
||||
return append(cmds, user.NewHumanEmailCodeAddedEventV2(ctx, &a.Aggregate, emailCode.Crypted, emailCode.Expiry, human.Email.URLTemplate, human.Email.ReturnCode, human.AuthRequestID)), nil
|
||||
}
|
||||
return cmds, nil
|
||||
}
|
||||
@@ -411,10 +411,9 @@ func (h *AddHuman) ensureDisplayName() {
|
||||
// and / or
|
||||
// - have no authentication method (password / passwordless)
|
||||
func (h *AddHuman) shouldAddInitCode() bool {
|
||||
return !h.ExternalIDP &&
|
||||
!h.Email.Verified ||
|
||||
!h.Passwordless &&
|
||||
h.Password == ""
|
||||
return len(h.Links) == 0 &&
|
||||
(!h.Email.Verified ||
|
||||
(!h.Passwordless && h.Password == ""))
|
||||
}
|
||||
|
||||
// Deprecated: use commands.AddUserHuman
|
||||
|
Reference in New Issue
Block a user