Creates a new user.
user
is returned but session
is null.user
and a session
are returned.SITE_URL
by default. You can modify your SITE_URL
or add additional redirect URLs in your project.User already registered
is returned.User's email address to be used for email authentication.
User's phone number to be used for phone authentication.
Password to be used for authentication.
The URL to redirect the user to after they confirm their email address.
The user's metadata to be stored in the user's object.
The captcha token to be used for captcha verification.
Messaging channel to use (e.g. whatsapp or sms). Defaults to `OtpChannel.sms`.
final AuthResponse res = await supabase.auth.signUp(
email: 'example@email.com',
password: 'example-password',
);
final Session? session = res.session;
final User? user = res.user;
final AuthResponse res = await supabase.auth.signUp(
phone: '123456789',
password: 'example-password',
channel: OtpChannel.sms,
);
final AuthResponse res = await supabase.auth.signUp(
email: 'example@email.com',
password: 'example-password',
data: \{'username': 'my_user_name'\},
);
final Session? session = res.session;
final User? user = res.user;
final AuthResponse res = await supabase.auth.signUp(
email: 'example@email.com',
password: 'example-password',
emailRedirectTo: 'com.supabase.myapp://callback',
);
final Session? session = res.session;
final User? user = res.user;