private async Task SignUpMethodAsync()

in Cognito User Pools Authentication Lab/Cognito.cs [74:112]


    private async Task SignUpMethodAsync()
    {

        Debug.Log("Signup method called");

        string userName = UsernameField.text;
        string password = PasswordField.text;
        string email = EmailField.text;

        AmazonCognitoIdentityProviderClient provider = new AmazonCognitoIdentityProviderClient(new Amazon.Runtime.AnonymousAWSCredentials(), Region);

        SignUpRequest signUpRequest = new SignUpRequest()
        {
            ClientId = AppClientID,
            Username = userName,
            Password = password
        };

        List<AttributeType> attributes = new List<AttributeType>()
            {
                new AttributeType(){Name = "email", Value = email}
            };

        signUpRequest.UserAttributes = attributes;

        try
        {
            SignUpResponse request = await provider.SignUpAsync(signUpRequest);

            Debug.Log("Sign up worked");
        }
        catch (Exception e)
        {

            Debug.Log("EXCEPTION" + e);
            return;
        }

    }