当前位置:网站首页>Firebase+Facebook 授权 web 登录提示域名验证或跳转错误

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

2022-08-09 09:27:00 草明

前提是 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
原网站

版权声明
本文为[草明]所创,转载请带上原文链接,感谢
https://blog.csdn.net/galoiszhou/article/details/121008804