For AI agents: the documentation index is at llms.txt. Guide pages have a markdown version at the same path with .md appended, before any query string or fragment.
.confirmationRequired(user)..signedIn(session), stores the session, and emits .signedIn.user and session properties. session is nil when the user must confirm first.SITE_URL by default. You can modify your SITE_URL or add additional redirect URLs in your project.signUp() is called for an existing confirmed user:
.confirmationRequired with an obfuscated/fake user object that has an empty identities list.User already registered is returned.user().One of `email` or `phone` must be provided.
One of `email` or `phone` must be provided.
undefined
The user metadata (`userMetadata`, a `JSONObject`), the redirect URL embedded in the email link (`redirectTo`, email sign-up only), the messaging channel (`channel`, phone sign-up only), and the captcha token (`captchaToken`).
let result = try await supabase.auth.signUp(
email: "example@email.com",
password: "example-password"
)
switch result {
case .signedIn(let session):
print("Signed in as \(session.user.id)")
case .confirmationRequired(let user):
print("Check your inbox, \(user.email ?? "")")
}
let result = try await supabase.auth.signUp(
phone: "123456789",
password: "example-password",
options: SignUpOptions(channel: .sms)
)
let result = try await supabase.auth.signUp(
phone: "123456789",
password: "example-password",
options: SignUpOptions(channel: .whatsapp)
)
let result = try await supabase.auth.signUp(
email: "example@email.com",
password: "example-password",
options: SignUpOptions(
userMetadata: [
"first_name": .string("John"),
"age": .number(24)
]
)
)
let result = try await supabase.auth.signUp(
email: "example@email.com",
password: "example-password",
options: SignUpOptions(
redirectTo: URL(string: "https://example.com/welcome")!
)
)