This extension allows clients to send and verify OTPs for authentication with the Dynamic client.
npm install @dynamic-labs/otp-extension
import { OtpExtension } from '@dynamic-labs/otp-extension';
import { createClient } from '@dynamic-labs/client';
import { View, Text } from 'react-native';
const dynamicClient = createClient({...}).extend(OtpExtension(['email']))
const sendEmailOTP = (email: string) =>
dynamicClient.auth.email.sendOTP(email)
const verifyEmailOTP = (token: string) =>
dynamicClient.auth.email.verifyOTP(token)