Firebase+Facebook 授权 web 登录提示域名验证或跳转错误

前提是 Firebase + Facebook 授权登录的已经配置好了, 以下主要是解决在 web app 中使用时遇到的域名和跳转错误的问题

1. 在 Firebase 里面设置

https://console.firebase.google.com/

Authentication  --> Sign-in method -->  Authorized domains --> Add domain

添加域名, 例如 test.gz.com

2. 在 Google Cloud Platform里面设置

https://console.cloud.google.com/apis/credentials

API&Services --> Credentials --> API Keys  --> Browser key (auto created by Firebase) 
  • Application restrictions 选择 `HTTP referrers(web sites).
  • Website restrictions 中添加域名

3. 在 Facebook

https://developers.facebook.com/apps/?show_reminder=true

Fcebook Login --> Settings

把 web 授权的都勾上

Valid OAuth Redirect URIs:

https://xxxxxxxx.firebaseapp.com/__/auth/handler

在 Firebase 中 Authentication --> Sign-in method --> Authorized domains 可以找到对应的域名

Settings --> Advanced --> Domain Manager
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值