Skip to content

Implement Supabase Auth SMS OTP with Twilio #3140

@dthyresson

Description

@dthyresson

See: https://supabase.io/docs/guides/auth/auth-twilio

Supabase now supports:

  • Using OTP with password based logins
let { user, error } = await supabase.auth.signUp({
  phone: '+13334445555',
  password: 'some-password'
})

then need to verify

let { session, error } = await supabase.auth.verifyOTP({
  phone: '+13334445555',
  token: '123456'
})

could also sign in with their phone and password as phone stored on user.

  • Using OTP as a passwordless sign-in mechanism
let { user, error } = await supabase.auth.signIn({
  phone: '+13334445555'
})

and also verify:

let { session, error } = await supabase.auth.verifyOTP({
  phone: '+13334445555',
  token: '123456'
})

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions