Dart Reference v2.0

Sign in a user

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

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

    User's email address to be used for email authentication.

    phone
    Optional
    String

    User's phone number to be used for phone authentication.

    password
    REQUIRED
    String

    Password to be used for authentication.

    captchaToken
    Optional
    String

    The captcha token to be used for captcha verification.


final AuthResponse res = await supabase.auth.signInWithPassword(
  email: '[email protected]',
  password: 'example-password',
);
final Session? session = res.session;
final User? user = res.user;