import {
sendEmailOTP,
verifyOTP
} from '@dynamic-labs-sdk/client';
// With the user's email, call sendEmailOTP to get the otpVerification
// Then, once the user inputs the OTP code, call verifyOTP to verify it and complete the authentication
let otpVerification = null
const singInWithEmail = async () => {
// Replace '[email protected]' with the user's email address
otpVerification = await sendEmailOTP({ email: '[email protected]' });
// Store the otpVerification for later use with the verifyOTP function
};
const verifyOTP = async () => {
// Use the same otpVerification object that you got from the sendEmailOTP function
// Replace '123456' with the OTP code entered by the user
await verifyOTP({ otpVerification, otp: '123456' });
};