【发布时间】:2021-01-09 17:48:16
【问题描述】:
在做一个项目时...我用谷歌帐户进行了身份验证。 但它不起作用
我使用 firebase 进行身份验证,当我点击按钮时……什么都没有显示……
firebase 代码如下
firebase.initializeApp(config);
export const auth= firebase.auth();
export const firestore=firebase.firestore();
const provider=new firebase.auth.GoogleAuthProvider();
provider.setCustomParameters({prompt:'select_account'});
export const signInWithGoogle=()=>auth.signInWithPopup(provider);
export default firebase;
调用代码是
<CustomButton type='submit'> SIGN IN</CustomButton>
<CustomButton onClick={signInWithGoogle}> SIGN IN WITH GOOGLE</CustomButton>
但两个按钮的行为相同..它显示所需的电子邮件...当我单击使用 google 登录时没有弹出窗口显示
自定义按钮是一个反应组件
请帮忙
【问题讨论】:
标签: javascript reactjs firebase-authentication google-signin