Skip to main content
All Web SDK methods for email magic link require you to initiate an action first. Check out our guide on email magic link authentication for more details.

Enroll

Start enrollment for a new email magic link authenticator by sending the user an email containing a verification link. This method is typically used when you’ve not yet verified the user’s email address.
const response = await authsignal.emailML.enroll({ email: "jane.smith@authsignal.com" });
If you’ve already verified a user’s email address independently of Authsignal, you can alternatively use a Server SDK to enroll the user programmatically.

Parameters

email
string
The user’s email address.

Response

response
AuthsignalResponse<EnrollResponse>

Challenge

Start re-authentication for an existing email magic link authenticator by sending the user an email containing a verification link. This method is typically used when you’ve already verified the user’s email address.
const response = await authsignal.emailML.challenge();

Response

response
AuthsignalResponse<ChallengeResponse>
Check the verification status of an email magic link authenticator. When the user clicks a valid magic link, the promise will resolve.
const response = await authsignal.emailML.checkVerificationStatus();

Response

response
AuthsignalResponse<VerifyResponse>
data
VerifyResponse