JavaScript: Resend an OTP

Resends an existing signup confirmation email, email change email, SMS OTP or phone change OTP.

Parameters

Examples

Resend an email signup confirmation

const { error } = await supabase.auth.resend({
  type: 'signup',
  email: '[email protected]',
  options: {
    emailRedirectTo: 'https://example.com/welcome'
  }
})

Resend a phone signup confirmation

const { error } = await supabase.auth.resend({
  type: 'sms',
  phone: '1234567890'
})

Resend email change email

const { error } = await supabase.auth.resend({
  type: 'email_change',
  email: '[email protected]'
})

Resend phone change OTP

const { error } = await supabase.auth.resend({
  type: 'phone_change',
  phone: '1234567890'
})