Exemple #1
0
        async void Btn_signin_Clicked(object sender, EventArgs e)
        {
            bool result = await auth.AuthenticateUser(Entry_email.Text, Entry_Password.Text);

            if (result)
            {
                await Navigation.PushAsync(new ListPage());

                Navigation.RemovePage(this);
            }
            else
            {
                ShowError();
            }
        }
Exemple #2
0
        public static async Task <bool> AuthenticateUser(string email, string password)
        {
            try
            {
                return(await auth.AuthenticateUser(email, password));
            }
            catch (Exception ex)
            {
                await App.Current.MainPage.DisplayAlert("Error", ex.Message, "Ok");

                return(false);
            }
        }