Exemplo n.º 1
0
        public static FirebaseAuthLink AttemptLoginUser(string email, string pass)
        {
            var authProvider             = FirebaseUtil.GetAuthProvider();
            Task <FirebaseAuthLink> task = authProvider.SignInWithEmailAndPasswordAsync(email, pass);

            try
            {
                task.Wait();
                return(task.Result);
            }
            catch (Exception e)
            {
            }
            return(null);
        }
Exemplo n.º 2
0
        public static bool ResetPassword(string email)
        {
            var  authProvider = FirebaseUtil.GetAuthProvider();
            Task task         = authProvider.SendPasswordResetEmailAsync(email);

            try
            {
                task.Wait();
                return(true);
            }
            catch (Exception e)
            {
            }
            return(false);
        }
Exemplo n.º 3
0
        public static FirebaseAuthLink AttemptCreateNewUser(string email, string pass, string displayName, bool verificationEmail)
        {
            var authProvider             = FirebaseUtil.GetAuthProvider();
            Task <FirebaseAuthLink> task = authProvider.CreateUserWithEmailAndPasswordAsync(email, pass, displayName, verificationEmail);

            try
            {
                task.Wait();
                return(task.Result);
            }
            catch (Exception e)
            {
                if (e.InnerException.Message.Contains("Reason: EmailExists"))
                {
                    //email exists error
                }
            }
            return(null);
        }