我在我的 javascript 文件中使用 firebase 节点 api 进行 Google 登录。
firebase.initializeApp(config);
let provider = new firebase.auth.GoogleAuthProvider();
firebase.auth().signInWithPopup(provider);
这个工作很好,用户可以用他的 Google 凭证登录。当用户再次访问该页面时,弹出窗口将再次打开,但由于用户已经登录,因此弹出窗口将关闭,不需要用户进行任何交互。有没有办法在提示弹出窗口之前检查是否已经有登录用户?