admin管理员组文章数量:1291009
I'm trying to implement firebase's email link auth on a web app and I'm having some trouble understanding what the problem here is.
I've followed their instructions on the page to send the email and it's sending, but the problem is the URL being sent is an invalid one.
async sendAuthEmail(email) {
var actionCodeSettings = {
// URL you want to redirect back to. The domain (www.example) for this
// URL must be whitelisted in the Firebase Console.
url: "http://localhost:3000",
// This must be true.
handleCodeInApp: true,
iOS: {
bundleId: ".example.ios"
},
android: {
packageName: ".example.android",
installApp: true,
minimumVersion: "12"
}
};
return await firebase
.auth()
.sendSignInLinkToEmail(email, actionCodeSettings);
}
And the URL being sent is (I changed my firebaseapp name):
https://?link=://localhost:3000&apn=.example.android&amv=12&ibi=.example.ios&ifl=://localhost:3000
I also tried changing the url
parameter but it fails anyway.
Any ideas that can be shared?
Thanks!
I'm trying to implement firebase's email link auth on a web app and I'm having some trouble understanding what the problem here is.
I've followed their instructions on the page to send the email and it's sending, but the problem is the URL being sent is an invalid one.
async sendAuthEmail(email) {
var actionCodeSettings = {
// URL you want to redirect back to. The domain (www.example.) for this
// URL must be whitelisted in the Firebase Console.
url: "http://localhost:3000",
// This must be true.
handleCodeInApp: true,
iOS: {
bundleId: ".example.ios"
},
android: {
packageName: ".example.android",
installApp: true,
minimumVersion: "12"
}
};
return await firebase
.auth()
.sendSignInLinkToEmail(email, actionCodeSettings);
}
And the URL being sent is (I changed my firebaseapp name):
https://?link=https://myfirebasedbname.firebaseapp./__/auth/action?apiKey%3DAIzaSyDSio7vAbW7O0TVGCF2UpG7FsQDvHX0M7Q%26mode%3DsignIn%26oobCode%3DXoAsz5CoIJOhdhAcJpC2E3iWI8fmyTwJPIUmMlgLvakAAAFiy0Wm9A%26continueUrl%3Dhttp://localhost:3000&apn=.example.android&amv=12&ibi=.example.ios&ifl=https://myfirebasedbname.firebaseapp./__/auth/action?apiKey%3DAIzaSyDSio7vAbW7O0TVGCF2UpG7FsQDvHX0M7Q%26mode%3DsignIn%26oobCode%3DXoAsz5CoIJOhdhAcJpC2E3iWI8fmyTwJPIUmMlgLvakAAAFiy0Wm9A%26continueUrl%3Dhttp://localhost:3000
I also tried changing the url
parameter but it fails anyway.
Any ideas that can be shared?
Thanks!
Share Improve this question edited Apr 16, 2018 at 14:03 Filipe Picoito asked Apr 15, 2018 at 21:57 Filipe PicoitoFilipe Picoito 6951 gold badge6 silver badges27 bronze badges1 Answer
Reset to default 9Have you configured your Firebase Dynamic Link domain? You need to do that in the dynamic links section of the Firebase Console.
If you are only using this for a web only app, you don' t need to include the android
or ios
fields in the ActionCodeSettings
object. This avoids the need to setup FDL:
var actionCodeSettings = {
url: "http://localhost:3000",
// This must be true.
handleCodeInApp: true
};
本文标签: javascriptsendSignInLinkToEmail sending invalid URLStack Overflow
版权声明:本文标题:javascript - sendSignInLinkToEmail sending invalid URL - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741522117a2383251.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论