diff --git a/persistence/sql/persister_registration.go b/persistence/sql/persister_registration.go index 94aaabbdfbd8..fc83cba1a0be 100644 --- a/persistence/sql/persister_registration.go +++ b/persistence/sql/persister_registration.go @@ -77,6 +77,7 @@ func (p *Persister) CreateRegistrationCode(ctx context.Context, codeParams *code now := time.Now() registrationCode := &code.RegistrationCode{ + Address: codeParams.Address, CodeHMAC: p.hmacValue(ctx, codeParams.RawCode), IssuedAt: now, ExpiresAt: now.UTC().Add(p.r.Config().SelfServiceCodeMethodLifespan(ctx)), diff --git a/selfservice/hook/code_address_verifier.go b/selfservice/hook/code_address_verifier.go index ea377d8f389f..e9f15eaf3d73 100644 --- a/selfservice/hook/code_address_verifier.go +++ b/selfservice/hook/code_address_verifier.go @@ -49,6 +49,7 @@ func (cv *CodeAddressVerifier) ExecutePostRegistrationPostPersistHook(w http.Res va := s.Identity.VerifiableAddresses[idx] if !va.Verified && recoveryCode.Address == va.Value { va.Verified = true + va.Status = identity.VerifiableAddressStatusCompleted if err := cv.r.PrivilegedIdentityPool().UpdateVerifiableAddress(r.Context(), &va); err != nil { return errors.WithStack(err) }