Choose and set up an email provider you want to use in the next screen. You can choose Authsignal for development purposes, but it’s recommended not to use it in production. Then click Activate Email Magic Link.
If the action state is CHALLENGE_REQUIRED, proceed with the magic link challenge:
Copy
Ask AI
import { Authsignal } from '@authsignal/browser';const authsignal = new Authsignal({ tenantId: 'YOUR_TENANT_ID',});// Set the token from the track responseauthsignal.setToken(token);// Send the magic link challengeconst challengeResponse = await authsignal.emailML.challenge();// Check verification status (this will resolve when user clicks the magic link)const verifyResponse = await authsignal.emailML.checkVerificationStatus();// Get the verification token to validate on your backendif (verifyResponse.data?.isVerified) { const verificationToken = verifyResponse.data.token;}
Copy
Ask AI
import { Authsignal } from '@authsignal/browser';const authsignal = new Authsignal({ tenantId: 'YOUR_TENANT_ID',});// Set the token from the track responseauthsignal.setToken(token);// Send the magic link challengeconst challengeResponse = await authsignal.emailML.challenge();// Check verification status (this will resolve when user clicks the magic link)const verifyResponse = await authsignal.emailML.checkVerificationStatus();// Get the verification token to validate on your backendif (verifyResponse.data?.isVerified) { const verificationToken = verifyResponse.data.token;}
Copy
Ask AI
import { Authsignal } from '@authsignal/browser';const authsignal = new Authsignal({ tenantId: 'YOUR_TENANT_ID',});// Launch the prebuilt UI with the URL from the track responseconst result = await authsignal.launch(url, { mode: 'popup', popupOptions: { width: '400px', isClosable: true, }});// Get the verification token to validate on your backendif (result.token) { const verificationToken = result.token;}