Javascript Reference v1.0

Sign in a user

  • A user can sign up either via email or OAuth.
  • If you provide email without a password, the user will be sent a magic link.
  • The magic link's destination URL is determined by the SITE_URL config variable. To change this, you can go to Authentication -> Settings on supabase.com/dashboard
  • Specifying a provider will open the browser to the relevant login page.

const { user, session, error } = await supabase.auth.signIn({
  email: '[email protected]',
  password: 'example-password',
})