gpt4 book ai didi

javascript - Firebase 仅发送已过期的电子邮件验证链接

转载 作者:搜寻专家 更新时间:2023-11-01 04:22:45 24 4
gpt4 key购买 nike

我收到验证邮件后立即点击验证链接,但答案仍然只有:

Try verifying your email again Your request to verify your email has expired or the link has already been used

发送验证邮件的当前代码如下所示,并在注册后立即运行。

firebase.auth().onAuthStateChanged(function(user) {
user.sendEmailVerification();
});

所需的 firebase 脚本如下所示:

<script src="https://www.gstatic.com/firebasejs/3.6.1/firebase.js"></script>
<script>
function init(){
var config = {
apiKey: "<asdf>",
authDomain: "<asdf>.firebaseapp.com",
databaseURL: "<asdf>.firebaseio.com"
};
firebase.initializeApp(config);
}
</script>
<script src="https://www.gstatic.com/firebasejs/3.6.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/3.6.1/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/3.6.1/firebase-database.js"></script>

并且启用电子邮件/密码作为登录方法。我将该设置与另一个具有有效验证邮件的 Firebase 项目进行了比较,但没有发现差异。

有人知道可能是什么问题吗?

最佳答案

答案在这里:stackoverflow.com/a/38274531/213156非常感谢,Travis Christian!

If you've listed any HTTP referrers for your app's API key in the Google API console, you need to include the app itself which is where the emails originate: [app-name].firebaseapp.com. Otherwise this domain is not valid for your app's key."

关于javascript - Firebase 仅发送已过期的电子邮件验证链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41145370/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com