@dynamic-labs/otp-extension
v2.0.8
Published
This extension allows clients to send and verify OTPs for authentication with the Dynamic client.
Downloads
23
Readme
otp-extension
This extension allows clients to send and verify OTPs for authentication with the Dynamic client.
Installation
npm install @dynamic-labs/otp-extension
Usage
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)