【发布时间】:2021-11-05 15:42:59
【问题描述】:
我正在使用云函数通过 admin sdk 生成密码重置链接。
我需要在我的网站而不是我的移动应用中处理操作链接。
我的操作代码设置如下:
ActionCodeSettings codeSettings = ActionCodeSettings(
url: "https://example.com/links/reset",
handleCodeInApp: false,
dynamicLinkDomain: "https://example.com/links"
);
我也试过了:
ActionCodeSettings codeSettings = ActionCodeSettings(
url: "https://example.com/links/reset",
handleCodeInApp: false,
);
两者都给我以下错误:
FirebaseAuthError: The provided dynamic link domain is not configured or authorized for the current project.
我只是在 onCall 对我的函数的 https 请求中使用 : admin.auth().generatePasswordResetLink(data.email, actionCodeSettings) 方法。
我当然已经为我的项目设置了动态链接,并且我的项目使用Firebase Hosting 托管。
我也将此添加到我的firebase.json 文件中:
"rewrites": [ {
"source": "/links/**",
"dynamicLinks": true
} ]
如documentation中所述。
我做错了什么?
【问题讨论】:
标签: firebase flutter google-cloud-functions firebase-dynamic-links