mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:07:36 +00:00
fix: pass necessary webauthn data through events (#1544)
This commit is contained in:
@@ -361,9 +361,11 @@ func (rm *HumanU2FLoginReadModel) Query() *eventstore.SearchQueryBuilder {
|
||||
type HumanPasswordlessLoginReadModel struct {
|
||||
eventstore.WriteModel
|
||||
|
||||
AuthReqID string
|
||||
Challenge string
|
||||
State domain.UserState
|
||||
AuthReqID string
|
||||
Challenge string
|
||||
AllowedCredentialIDs [][]byte
|
||||
UserVerification domain.UserVerificationRequirement
|
||||
State domain.UserState
|
||||
}
|
||||
|
||||
func NewHumanPasswordlessLoginReadModel(userID, authReqID, resourceOwner string) *HumanPasswordlessLoginReadModel {
|
||||
@@ -395,6 +397,8 @@ func (wm *HumanPasswordlessLoginReadModel) Reduce() error {
|
||||
switch e := event.(type) {
|
||||
case *user.HumanPasswordlessBeginLoginEvent:
|
||||
wm.Challenge = e.Challenge
|
||||
wm.AllowedCredentialIDs = e.AllowedCredentialIDs
|
||||
wm.UserVerification = e.UserVerification
|
||||
wm.State = domain.UserStateActive
|
||||
case *user.UserRemovedEvent:
|
||||
wm.State = domain.UserStateDeleted
|
||||
|
Reference in New Issue
Block a user