Email Authentication enables users to authenticate and recover their Turnkey accounts using email-based verification. There are two methods of email authentication:
ACTIVITY_TYPE_INIT_OTP_AUTH
with these parameters:
otpType
: specify "OTP_TYPE_EMAIL"
contact
: user’s email address (must match their registered email)emailCustomization
: optional parameters for customizing emailsuserIdentifier
: optional parameter for rate limiting SMS OTP requests per user.
We recommend generating this server-side based on the user’s IP address or public key.
See the OTP Rate Limits section below for more details.ACTIVITY_TYPE_OTP_AUTH
:
otpId
: ID from the init activityotpCode
: the 6-digit code received via emailtargetPublicKey
: public key for credential encryptionapiKeyName
: optional name (defaults to OTP Auth - <Timestamp>
)expirationSeconds
: optional validity window (defaults to 15 minutes)invalidateExisting
: optional boolean to invalidate previous OTP Auth API keysuserIdentifier
parameter is provided, the following limits are enforced:
userIdentifier
ACTIVITY_TYPE_EMAIL_AUTH
with these parameters:
email
: user’s email address (must match their registered email)targetPublicKey
: public key for credential encryptionapiKeyName
: optional name (defaults to Email Auth - <Timestamp>
)expirationSeconds
: optional validity window (defaults to 15 minutes)emailCustomization
: optional parameters for customizing emailsinvalidateExisting
: optional boolean to invalidate previous Email Auth API keysACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY
activity type, which requires:
email
: the email of the user needing recovery (must match their registered email)targetPublicKey
: the public key for recovery credential encryptionACTIVITY_TYPE_RECOVER_USER
activity, which can add new authenticators to regain account accessACTIVITY_TYPE_INIT_OTP_AUTH
and ACTIVITY_TYPE_OTP_AUTH
ACTIVITY_TYPE_EMAIL_AUTH
ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY
:
ACTIVITY_TYPE_RECOVER_USER
:
FEATURE_NAME_OTP_EMAIL_AUTH
for OTP-based authenticationFEATURE_NAME_EMAIL_AUTH
for credential bundle authenticationACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE
to disable:
FEATURE_NAME_OTP_EMAIL_AUTH
for OTP-based authenticationFEATURE_NAME_EMAIL_AUTH
for credential bundle authenticationFEATURE_NAME_EMAIL_RECOVERY
for recoverydisableOtpEmailAuth
parameter for OTP-based authenticationdisableEmailAuth
parameter for credential bundle authenticationdisableEmailRecovery
parameter for recoveryACTIVITY_TYPE_SET_ORGANIZATION_FEATURE
CreateSubOrganizationIntentV7
activity parameters