TopShelfCustomer/TopShelfCustomer/ViewModels/CreateNewAccountViewModel.cs
/// <summary>
/// ConfirmNewAccount:
///
/// Uses platform-specific implementation of Firebase to create/register a new account
/// </summary>


Uses platform-specific implementation of Firebase to create/register a new account
Uses platform - specific implementation of Firebase to create / register a new account
private async void ConfirmNewAccount () {
                if ( EmailInput != "" && PasswordInput != "" ) {     
                    var success = await auth.RegisterWithEmailPassword( EmailInput, PasswordInput );
                    if ( success != "" ) {
                        Debug.WriteLine( "Successfully created your account" );
                        App.SetNewPage<LoginPage>();
                    } else {
                        Debug.WriteLine( success );
                        CreationErrorMessage = "Failed to register account with firebase";
                        IsErrorOnCreation = true;
                    }
                } else {
                    CreationErrorMessage = "Invalid E-mail or Password";
                    IsErrorOnCreation = true;
                }
            }
private async void ConfirmNewAccount ( ) { if ( EmailInput != " " && PasswordInput != " " ) { var success = await auth . RegisterWithEmailPassword ( EmailInput , PasswordInput ) ; if ( success != " " ) { Debug . WriteLine ( " " ) ; App . SetNewPage < LoginPage > ( ) ; } else { Debug . WriteLine ( success ) ; CreationErrorMessage = " " ; IsErrorOnCreation = true ; } } else { CreationErrorMessage = " " ; IsErrorOnCreation = true ; } }
ConfirmNewAccount:
ConfirmNewAccount :
//Check if Email and Password are valid