<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Welcome to Firebase Hosting</title><!-- update the version number as needed --><script defer src="/__/firebase/7.17.1/firebase-app.js"></script><!-- include only the Firebase features as you need --><script defer src="/__/firebase/7.17.1/firebase-auth.js"></script><script defer src="/__/firebase/7.17.1/firebase-database.js"></script><script defer src="/__/firebase/7.17.1/firebase-messaging.js"></script><script defer src="/__/firebase/7.17.1/firebase-storage.js"></script><!-- initialize the SDK after all desired features are loaded --><script defer src="/__/firebase/init.js"></script><script defer src="https://www.gstatic.com/firebasejs/ui/4.6.0/firebase-ui-auth.js"></script><link type="text/css" rel="stylesheet" href="https://www.gstatic.com/firebasejs/ui/4.6.0/firebase-ui-auth.css" /><script defer> var uiConfig = { signInSuccessUrl: 'main.html', signInOptions: [ firebase.auth.GoogleAuthProvider.PROVIDER_ID, firebase.auth.EmailAuthProvider.PROVIDER_ID ], tosUrl: '<your-tos-url>', // Privacy policy url/callback. privacyPolicyUrl: function() { window.location.assign('<your-privacy-policy-url>'); } }; var ui = new firebaseui.auth.AuthUI(firebase.auth()); ui.start('#firebaseui-auth-container', uiConfig);</script>当我在浏览器中打开页面时,出现以下错误Uncaught ReferenceError: firebase is not defined。我不确定如何解决这个问题。我正在使用保留的托管网址来下载 Firebase JS SDK。我的理解是initializeApp()不需要您在其他帖子中看到的有关该问题的配置变量和方法,对吗?我真的不确定发生了什么。我尝试将脚本插入文档的主体和头部。我什至尝试使用插入在 body 元素底部的单独的 js 文件。
添加回答
举报
0/150
提交
取消