firebase-admin SDK中的自定义授权?
我一直在寻找和讨论组查找与我的域服务器端生成SignWithemaillink的任何提示。
是否可以使用我的域中自定义服务器端中的signin链接?还是在 client app 中只是可能吗?
使用您的身份提供商更新回调URL以使用您的自定义域而不是默认域。例如,更改 https://myproject.firebaseapp.com/__/auth/auth/auth/auth/auth/handler https://auth.mycustomgomain.com/__/auth/auth/handler 。
这是我的实际工作,但我更喜欢最干净的解决方案。
let link = await getAuth().generateSignInWithEmailLink(email, actionCodeSettings);
if(link.startsWith("https://myproject.firebaseapp.com")) {
link = link.replace("https://myproject.firebaseapp.com", process.env.AUTH_URL);
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的方法实际上是一个很好的方法,但是可以替换普通的字符串。尝试使用
url
类,它更清晰且容易出错。Your approach is actually a good one, but it's a bit rough with a plain string replacement. Try using the
URL
class, it is clearer and less error-prone.转到模板页面 ”。
这样做的进步是,它不仅会影响firebase管理员。
Go to the templates page, click edit and then click "customize domain".
The advance of doing so is that it not only affects Firebase admin.