EmailAddress
verification
These are all methods on the EmailAddress
class that allow you to verify a user's email address.
prepareVerification()
Kick off the verification process for this email address. An email message with a one-time code or an email-link will be sent to the email address box.
function prepareVerification(params: PrepareEmailAddressVerificationParams): Promise<EmailAddress>;
PrepareEmailAddressVerificationParams
Name | Type | Description |
---|---|---|
strategy | 'email_link' | 'email_code' | The verification strategy. Possible strategy values are:
|
redirectUrl | string | undefined | The email link target URL. Users will be redirected here once they click the email link from their email. This param only applies if strategy is email_link . |
attemptVerification()
Attempts to verify this email address, passing the one-time code that was sent as an email message. The code will be sent when calling the EmailAddress.prepareVerification() method.
function attemptVerification(params: AttemptEmailAddressVerificationParams): Promise<EmailAddress>;
AttemptEmailAddressVerificationParams
Name | Type | Description |
---|---|---|
code | string | The one-time code that was sent to the user's email address when EmailAddress.prepareVerification() was called with strategy set to email_code . |
Last updated on January 8, 2024