我使用Firebase教程将Firebase身份验证类型的电子邮件/密码集成到了我的android应用程序中。对于登录阶段,我正在使用“ signInWithEmailAndPassword(字符串电子邮件,字符串密码)”功能。我的问题是,凭证是通过安全通道(https)发送的,还是以任何方式进行加密的,然后再发送到Firebase身份验证服务器。在阅读文档时,我尚未找到有关https使用的任何规范,也未阅读任何功能说明。
这是我的身份验证功能
private FirebaseAuth mAuth=FirebaseAuth.getInstance();
private void signIn(String email, String password) {
Log.d("Log in", "signIn:" + email);
//showProgressDialog();
// [START sign_in_with_email]
mAuth.signInWithEmailAndPassword(email, password)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
// Sign in success, update UI with the signed-in user's information
Log.d("Sign in success!", "signInWithEmail:success");
Intent main2 = new Intent(getApplicationContext(),Main_activity_2.class);
startActivity(main2);
} else {
// If sign in fails, display a message to the user.
Log.w("Failure:", "signInWithEmail:failure", task.getException());
Toast.makeText(getApplicationContext(),"Authentication failed!",Toast.LENGTH_SHORT).show();
//updateUI(null);
}
}
});
// [END sign_in_with_email]
}
函数调用:
final TextView email = findViewById(R.id.email);
final TextView pass = findViewById(R.id.passwd);
signIn(email.getText().toString(), pass.getText().toString());