Add numeric verification code support to EmailVerification
Feature
Implementation details
It would be great to add support for sending and validating a one-time numeric verification code alongside the existing email verification token/link in EmailVerification.
Use case: when email is the user's only authentication method, requiring confirmation through multiple email links is less convenient from a UX perspective. For an email change, the old email should receive an approval link, while the new email receives a short numeric code that the user enters on the confirmation page.
This link + code flow is more convenient than requiring users to follow verification links from both emails. The code should be generated, stored, expired, and validated by SuperTokens, similarly to the existing verification token flow.
Source: supertokens/supertokens-core