Skip to main content

Dashboard Configuration

Simply toggle on “Email” in the Log in & User Profile section of the dashboard. React Native provides email authentication through the dynamic client’s auth methods, allowing you to send OTP codes and verify them.
React Native
import { dynamicClient } from '<path to client file>';
import { useState } from 'react';
import { View, TextInput, Button } from 'react-native';

const EmailSignIn = () => {
  const [email, setEmail] = useState('');
  const [otp, setOtp] = useState('');
  const [otpSent, setOtpSent] = useState(false);

  const handleSendOTP = async () => {
    await dynamicClient.auth.email.sendOTP(email);
    setOtpSent(true);
  };

  const handleResendOTP = () => {
    dynamicClient.auth.email.resendOTP();
  };

  const handleVerifyOTP = async () => {
    await dynamicClient.auth.email.verifyOTP(otp);
  };

  return (
    <View>
      {!otpSent ? (
        <View>
          <TextInput
            value={email}
            onChangeText={setEmail}
            placeholder="Enter your email"
          />
          <Button onPress={handleSendOTP}>Send OTP</Button>
        </View>
      ) : (
        <View>
          <TextInput
            value={otp}
            onChangeText={setOtp}
            placeholder="Enter OTP"
          />
          <Button onPress={handleVerifyOTP}>Verify OTP</Button>
          <Button onPress={handleResendOTP}>Resend OTP</Button>
        </View>
      )}
    </View>
  );
};

Rate Limits

Email verification is subject to the following rate limits:
  • 3 attempts per 10 minutes per email address
This is in place to protect deliverability of emails and to prevent abuse.