Skip to main content
Version: v1-dev

auth.signUp()

Creates a new user.

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

final User? user = res.user;

Notes

  • By default, the user will need to verify their email address before logging in. If you would like to change this, you can disable "Email Confirmations" by going to Authentication -> Settings on app.supabase.com
  • If "Email Confirmations" is turned on, a user is returned but session will be null
  • If "Email Confirmations" is turned off, both a user and a session will be returned
  • When the user confirms their email address, they will be redirected to localhost:3000 by default. To change this, you can go to Authentication -> Settings on app.supabase.com

Examples

Sign up.

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

final User? user = res.user;

Sign up with third-party providers.

If you are using Flutter, you can sign up with OAuth providers using the signInWithProvider() method available on supabase_flutter.