teamhanko / hanko

Authentication and user management for the passkey era.
https://hanko.io
Other
5.67k stars 794 forks source link

fix: correct email onboarding after login #1521

Closed bjoern-m closed 1 month ago

bjoern-m commented 1 month ago

Description

Fixes an error during the onboarding process for email addresses at login. Previously, email verification needed to be enabled, and users had to navigate back from the passcode view and then forward again to the passcode view. This caused a duplicate key error because the email address was already stored in the database during the email creation action. With this fix, the email address is only saved once verification is completed.