By default, the user needs to verify their email address before logging in. To turn this off, disable Confirm email in your project.
Confirm email determines if users need to confirm their email address after signing up.
If Confirm email is enabled, the return value is the user and you won't be logged in automatically.
If Confirm email is disabled, the return value is null and you will be logged in instead.
When the user confirms their email address, they are redirected to the SITE_URL by default. You can modify your SITE_URL or add additional redirect URLs in your project.
To learn how to handle OTP links & OAuth refer to initializing
If signUpWith() is called for an existing confirmed user:
If Confirm email is enabled in your project, an obfuscated/fake user object is returned.
If Confirm email is disabled, the error message, User already registered is returned.
Examples
Sign up with email
val user = supabase.gotrue.signUpWith(Email) \{
email = "example@email.com"
password = "example-password"
\}
Sign up with a phone number
val user = supabase.gotrue.signUpWith(Phone) \{
phoneNumber = "+4912345679"
password = "example-password"
\}
Sign up with additional user metadata
val user = supabase.gotrue.signUpWith(Email) \{
email = "example@email.com"
password = "example-password"
data = buildJsonObject \{
put("first_name", "John")
put("age", 24)
\}
\}
Sign up with a redirect URL
val user = supabase.gotrue.signUpWith(Email, redirectUrl = "https://example.com") \{
email = "example@email.com"
password = "example-password"
\}