且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Google Firebase 在 Android 应用中注销并忘记用户

更新时间:2023-12-02 13:08:04

Firebase Auth Quickstart 示例代码,Google 提供商的注销包括这些步骤.您在退出时是否调用了 GoogleSignInClient.signOut()?

In the Firebase Auth Quickstart sample code, the sign-out for Google provider includes these steps. Are you calling GoogleSignInClient.signOut() when you sign-out?

private void signOut() {
    // Firebase sign out
    mAuth.signOut();

    // Google sign out
    mGoogleSignInClient.signOut().addOnCompleteListener(this,
            new OnCompleteListener<Void>() {
                @Override
                public void onComplete(@NonNull Task<Void> task) {
                    updateUI(null);
                }
            });
}