【问题标题】:The provided dynamic link domain is not configured or authorized for the current project提供的动态链接域未为当前项目配置或授权
【发布时间】:2019-08-29 02:49:49
【问题描述】:

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

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

我的代码在下面。


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);
        });
    });
});

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

【问题讨论】:

    标签: node.js firebase firebase-authentication google-cloud-functions


    【解决方案1】:

    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
    };
    

    【讨论】:

      猜你喜欢
      • 2021-11-05
      • 1970-01-01
      • 2022-10-23
      • 1970-01-01
      • 2014-04-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-29
      相关资源
      最近更新 更多