Sign in a user
- A user can sign up either via email or OAuth.
- If you provide
email
without apassword
, 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 app.supabase.com
- Specifying a
provider
will open the browser to the relevant login page.
const { user, session, error } = await supabase.auth.signIn({
email: 'example@email.com',
password: 'example-password',
})