Email OTP Authentication
Email OTP authentication allows you to log in and sign up users using an email address. Your users will receive six-digit code in their inbox which they can enter in your site to complete login.
Authenticate a user
example.ts
import { signer } from "./signer";
// send the email
await signer.authenticate({
type: "email",
emailMode: "otp",
email: "user@mail.com",
});
// later once the user has entered the code from their email
await signer.authenticate({
type: "otp",
otpCode: "123456",
});