Creates a new user and returns a SignUpState that tells a signed-in user apart from one who still has to confirm.
SignUpAsync() replaces SignUp(). SignUp() is marked [Obsolete] and is removed in v9. It ignores SignUpOptions.FlowType and SignUpOptions.Channel, and it returns a Session that means two different things depending on whether confirmation is required.SignUpState.Session is set when the user is signed in. It is null while the user has to confirm their email address or phone number. The client stores the session and raises AuthState.SignedIn when a session is returned.SignUpState.User is the signed-up user, including one that is waiting for confirmation.SignUpState.PKCEVerifier is set for an email sign-up with FlowType = OAuthFlowType.PKCE. Keep it and pass it with the code from the confirmation link to ExchangeCodeForSession().SignUpOptions.Channel chooses how the code is sent (SMS or WhatsApp). The default is SMS.SignUpOptions.CaptchaToken when CAPTCHA protection is enabled for your project.Identities list is empty, or a GotrueException with the reason UserAlreadyRegistered.var signedUp = await supabase.Auth.SignUpAsync(SignUpType.Email, email, password);
if (signedUp.Session == null)
{
// The user has to confirm their email address before signing in.
}
var signedUp = await supabase.Auth.SignUpAsync(SignUpType.Email, email, password,
new SignUpOptions { FlowType = OAuthFlowType.PKCE, RedirectTo = "https://example.com/confirm" });
// Keep the verifier until the user comes back with the code from the confirmation link.
var verifier = signedUp.PKCEVerifier;
var signedUp = await supabase.Auth.SignUpAsync(SignUpType.Phone, "+13334445555", password,
new SignUpOptions
{
CaptchaToken = captchaToken,
Channel = SignInWithPasswordlessPhoneOptions.MessagingChannel.WHATSAPP
});