C#: SignUpAsync()

Creates a new user and returns a SignUpState that tells a signed-in user apart from one who still has to confirm.

Examples

Sign up with an email and password

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.
}

Sign up with the PKCE flow

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;

Sign up with a phone number and a CAPTCHA token

var signedUp = await supabase.Auth.SignUpAsync(SignUpType.Phone, "+13334445555", password,
    new SignUpOptions
    {
        CaptchaToken = captchaToken,
        Channel = SignInWithPasswordlessPhoneOptions.MessagingChannel.WHATSAPP
    });