JavaScript: Sign in a user

Log in an existing user with an email and password or phone and password.

Parameters

Examples

Sign in with email and password

const \{ data, error \} = await supabase.auth.signInWithPassword(\{
  email: '[email protected]',
  password: 'example-password',
\})

Sign in with phone and password

const \{ data, error \} = await supabase.auth.signInWithPassword(\{
  phone: '+13334445555',
  password: 'some-password',
\})