【发布时间】:2017-09-14 10:33:45
【问题描述】:
在接受的答案的 cmets 中指出,我应该将我的 firebase 版本设置为 4.3.1,而不是我的上一个版本 4.2.0
您好,这应该很简单,我正在关注以下文档:firebase passing state in email actions 和 changing the default email-handler
我希望在用户验证他的电子邮件后将其重定向到新网址。该 url 已经在 firebase 的 Authenticated 域中。
我也已经有了 actionCodeSettings:
var actionCodeSettings = {
url: 'http://myurl.io/join',
iOS: {
bundleId: 'com.myurl.ios'
},
android: {
packageName: 'com.myurl.android',
installApp: false,
minimumVersion: '12'
},
handleCodeInApp: false
};
function sendEmailVerification() {
console.log('sendEmail Verification');
firebase.auth().currentUser.sendEmailVerification(actionCodeSettings).then(function() {
});
}
如果我理解正确,我现在需要实现我从另一个答案中找到的 getParameterByName。我的两个问题是:
1) 默认操作 URL 是 https://faros-fe2f5.firebaseapp.com/__/auth/action 。我应该改变这个吗?我猜它会根据我的 actionCodeSettings 自动更改
2) 在113 行,我们有一个感兴趣的函数,它接受通过getParameterByName 检索的参数。此时如何调用 continueUrl?
我发现有关此主题的文档有点含糊。在这个阶段,我想在电子邮件验证完成后重定向用户
【问题讨论】:
标签: firebase firebase-authentication