【发布时间】:2019-05-18 21:15:30
【问题描述】:
我已使用 Firebase 教程将 Firebase 身份验证类型的电子邮件/密码与我的 Android 应用程序集成。对于登录阶段,我使用“signInWithEmailAndPassword(字符串电子邮件,字符串密码)”功能。我的问题是凭据是通过安全通道 (https) 发送还是在发送到 Firebase-auth 服务器之前以任何方式加密。阅读文档,我还没有找到任何关于使用 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());
【问题讨论】:
标签: android https firebase-authentication