gpt4 book ai didi

node.js - 当前项目未配置或授权提供的动态链接域

转载 作者:太空宇宙 更新时间:2023-11-03 22:49:13 25 4
gpt4 key购买 nike

我的目标是使用 Firebase 功能和身份验证为注册用户发送电子邮件。我关注了Firebase example 。但它显示以下错误消息。

The provided dynamic link domain is not configured or authorized for the current project

我的代码在下面。


const actionCodeSettings = {
url: 'https://www.example.com/finishSignUp?cartId=1234',
handleCodeInApp: true,
iOS: {
bundleId: 'com.example.ios'
},
android: {
packageName: 'com.example.android',
installApp: true,
minimumVersion: '12'
},
dynamicLinkDomain: 'example.page.link'
};


exports.sendmail = functions.https.onRequest((req, res) => {
return cors(req, res, () => {
firebase.auth().sendSignInLinkToEmail("sungyong@humminglab.io", actionCodeSettings)
.then((userCredential) => {
res.status(200).send(userCredential);
res.status(200).send(userCredential);
return;
})
.catch(error => {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
console.log(error)
// ...
res.status(400).send(error);
});
});
});

这是我在控制台上的配置。

enter image description here

最佳答案

example.page.link 未配置为您项目的动态链接域。

您需要使用您自己的。您可以从 Firebase 控制台左侧菜单中“增长”下的“动态链接”中获取该信息。

如果您不需要在移动流程中使用动态链接,只需更改为:

const actionCodeSettings = {
// Replace this URL with the URL where the user will complete sign-in.
url: 'https://www.example.com/finishSignUp?cartId=1234',
handleCodeInApp: true
};

关于node.js - 当前项目未配置或授权提供的动态链接域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55565212/

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