mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-13 01:25:11 +00:00
fix: reducer for PasskeyVerified sets VerifiedAt (#11929)
# Which Problems Are Solved In https://github.com/zitadel/zitadel/pull/11858#discussion_r2993742914 we discussed on how to translate the ES passkey state to a relational one. That is used to filter out passkeys during convertion to webauthn credentials. It was decided to consider passkeys in ready state those that have a verified at `time.Time` set. The change required fixing the reducer for the eventstore event. # How the Problems Are Solved - Set `VerifiedAt` once `HumanWebAuthNVerifiedEvent` is received - Also set the verification to `nil` # Additional Context - Discussion #11858 - Follow-up for PR #11858
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package projection
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/eventstore"
|
||||
"github.com/zitadel/zitadel/internal/zerrors"
|
||||
)
|
||||
@@ -8,7 +10,7 @@ import (
|
||||
func assertEvent[T eventstore.Event](event eventstore.Event) (T, error) {
|
||||
e, ok := event.(T)
|
||||
if !ok {
|
||||
return e, zerrors.ThrowInvalidArgumentf(nil, "HANDL-1m9fS", "reduce.wrong.event.type %T", event)
|
||||
return e, zerrors.CreateZitadelError(zerrors.KindInvalidArgument, nil, "HANDL-1m9fS", fmt.Sprintf("reduce.wrong.event.type %T", event), 1)
|
||||
}
|
||||
return e, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user