async Task RegisterUser() { var TaskCompletionListener = new AuthCompletionListener(TaskCompletionListener_Success, TaskCompletionListener_Failure); Authenticator.AddOnFailureListener(TaskCompletionListener); Authenticator.AddOnSuccessListener(TaskCompletionListener); await Authenticator.RegisterUserAsync(Customer); }
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); }
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)); } }