Home

Sign in a user

Log in an existing user, or login via a third-party provider.

  • A user can sign up via email, phone number.
  • 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 app.supabase.com
  • Similarly, if you provide phone without a password, the user will be sent a one time password.
  • If you are looking to sign users in with OAuth in Flutter apps, go to signInWithProvider().

final res = await supabase.auth.signIn(email: 'example@email.com', password: 'example-password');

final user = res.data?.user;
final error = res.error;