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); }
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); }
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); }