簡體   English   中英

Firebase 身份驗證控制台未顯示添加的新用戶

[英]Firebase Authentication console is not showing new users added

我在我的 Android 應用程序中使用電子郵件/密碼為用戶實現了一個簡單的登錄。 當我注冊用戶時,他們的信息幾乎會立即顯示在 Firebase 控制台上。 這不再發生,我無法通過控制台刪除用戶。 它在 iOS 端完全正常工作,它使用相同的 Firebase 項目。

這是我創建用戶的代碼。

private void createAccount(String email, String password) {
        if (!validateForm()) {
            return;
        }

        mAuth.createUserWithEmailAndPassword(email, password)
                .addOnCompleteListener(getActivity(), 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(TAG, "createUserWithEmail:success");
                            FirebaseUser user = mAuth.getCurrentUser();
                            Toast.makeText(getContext(), "User was successfully created.", Toast.LENGTH_SHORT).show();
                            sendEmailVerification();
                            EmailConfirmationFragment fragment = new EmailConfirmationFragment();
                            FragmentTransaction transaction = Objects.requireNonNull(getActivity()).getSupportFragmentManager().beginTransaction();
                            transaction.replace(R.id.registration_root, fragment)
                                    .addToBackStack(null)
                                    .commit();
                        } else {
                            Log.w(TAG, "createUserWithEmail:failure", task.getException());
                            Toast.makeText(getContext(), "Error detected. " + task.getException().getLocalizedMessage(), Toast.LENGTH_SHORT).show();
                        }
                    }
                });
    }

首先,檢查您的“AndroidManifest.xml”文件。

<uses-permission android:name="android.permission.INTERNET" />

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM