Firebase:未授权此域 [英] Firebase: This domain is not authorized
问题描述
我导入了 Firebase JS v3 API ,并用于通过以下方式初始化Firebase:
I imported Firebase JS v3 API and used to initialize Firebase using:
firebase.initializeApp(config);
但是,该应用无法通过本地主机上的Web浏览器正确加载,导致出现以下错误:
However the app failed to load correctly via web browser on localhost, resulting in the following error:
错误:该域未获得您的OAuth操作的授权 Firebase项目.从中编辑授权域的列表 Firebase控制台.
Error: This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.
firebase.js:71:1333
firebase.js:71:1333
推荐答案
我通过将localhost
域添加到OAuth redirect domains
(在Firebase控制台的Auth
选项卡上的SETUP SIGN IN METHOD
内)解决了该问题.
I solved the problem by adding the localhost
domain to OAuth redirect domains
(within SETUP SIGN IN METHOD
on the Auth
tab of Firebase console).
这篇关于Firebase:未授权此域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!