Ejemplo n.º 1
0
        async Task RegisterUser()
        {
            var TaskCompletionListener = new AuthCompletionListener(TaskCompletionListener_Success, TaskCompletionListener_Failure);

            Authenticator.AddOnFailureListener(TaskCompletionListener);
            Authenticator.AddOnSuccessListener(TaskCompletionListener);
            await Authenticator.RegisterUserAsync(Customer);
        }
Ejemplo n.º 2
0
        private async void BtnLogin_Click(object sender, EventArgs e)
        {
            Animator.FadeIn();

            Email    = txtEmail.EditText.Text;
            Password = txtPassword.EditText.Text;

            if (UserUtil.PromptIfInvalid(RootView, Email, Password))
            {
                return;
            }

            var TaskCompletionListener = new AuthCompletionListener(TaskCompletionListener_Success, TaskCompletionListener_Failure);

            Authenticator.AddOnFailureListener(TaskCompletionListener);
            Authenticator.AddOnSuccessListener(TaskCompletionListener);
            await Authenticator.SignInWithEmailAndPasswordAsync(Email, Password);
        }
Ejemplo n.º 3
0
 protected override void OnResume()
 {
     base.OnResume();
     InitControls();
     ResolveDependencies();
     CheckKey();
     if (HasPreviousLogin())
     {
         var TaskCompletionListener = new AuthCompletionListener(TaskCompletionListener_Success, TaskCompletionListener_Failure);
         Authenticator.AddOnFailureListener(TaskCompletionListener);
         Authenticator.AddOnSuccessListener(TaskCompletionListener);
         Authenticator.SignInWithEmailAndPasswordAsync(User.Email, User.Password);
     }
     else
     {
         StartActivity(typeof(LoginActivity));
     }
 }