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.getUser()
.const \{ data, error \} = await supabase.auth.signUp(\{
email: 'example@email.com',
password: 'example-password',
\})
const \{ data, error \} = await supabase.auth.signUp(\{
phone: '123456789',
password: 'example-password',
options: \{
channel: 'sms'
\}
\})
const \{ data, error \} = await supabase.auth.signUp(\{
phone: '123456789',
password: 'example-password',
options: \{
channel: 'whatsapp'
\}
\})
const \{ data, error \} = await supabase.auth.signUp(
\{
email: 'example@email.com',
password: 'example-password',
options: \{
data: \{
first_name: 'John',
age: 27,
\}
\}
\}
)
const \{ data, error \} = await supabase.auth.signUp(
\{
email: 'example@email.com',
password: 'example-password',
options: \{
emailRedirectTo: 'https://example.com/welcome'
\}
\}
)