예제 #1
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);
        }
예제 #2
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));
     }
 }