Is the Firebase sign in method signInWithEmailAndPassword(email, password); use in flutter sends the password hashed?

Viewed 494
final FirebaseAuth _firebaseAuth = FirebaseAuth.instance;
Future<String> signIn(String email, String password) async {
    AuthResult result = await _firebaseAuth.signInWithEmailAndPassword(
        email: email, password: password);
    FirebaseUser user = result.user;
    return user.uid;
  }

Does the String password passed to this function send it as original string or as a password hash?

Is the sent password as hash OR it is hashed at the backed ?

2 Answers

I think it is just passed the original string. Firebase Authentication uses an internally modified version of scrypt to hash account passwords. Even when an account is uploaded with a password using a different algorithm, Firebase Auth will rehash the password the first time that account successfully logs in. Accounts downloaded from Firebase Authentication will only ever contain a password hash if one for this version of scrypt is available, or contain an empty password hash otherwise.

Related