前提是 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