signInWithPassword()

Log in an existing user using email or phone number with password.

1final AuthResponse res = await supabase.auth.signInWithPassword(
2  email: 'example@email.com',
3  password: 'example-password',
4);
5final Session? session = res.session;
6final User? user = res.user;

Notes#

  • Requires either an email and password or a phone number and password.

Examples#

Sign in with email and password#

1final AuthResponse res = await supabase.auth.signInWithPassword(
2  email: 'example@email.com',
3  password: 'example-password',
4);
5final Session? session = res.session;
6final User? user = res.user;

Sign in with phone and password#

1final AuthResponse res = await supabase.auth.signInWithPassword(
2  phone: '+13334445555',
3  password: 'example-password',
4);
5final Session? session = res.session;
6final User? user = res.user;