我正在嘗試使用Firebase和Electron。在安裝時就像我在網頁上一樣,它不起作用,因爲Electron頁面是本地託管的,沒有hostname
。這是我得到的錯誤...與電子一起使用Firebase
Uncaught Error: This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.
我無法將一個空的(或通配符)授權域添加到Firebase控制檯,因此我被卡住了。有沒有人有任何想法來解決這個問題?
編輯:這是我使用的代碼,它僅僅是標準的樣板,沒有什麼多餘的......
<script src="https://www.gstatic.com/firebasejs/live/3.0/firebase.js"></script>
<script>
var config = {
apiKey: "AIzaSyBvmmPB0_Oddc-02cUj3Ntt3wi8jSxxxx",
authDomain: "xxxxx-d24ad.firebaseapp.com",
databaseURL: "https://xxxxx-d24ad.firebaseio.com",
storageBucket: "",
};
firebase.initializeApp(config);
</script>
能否請您發佈的代碼片段?我不知道Firebase需要主機名。 – Charlie
@Charlie,添加了一個代碼片段。 – DaveJ
@Daveyjoe - 剛剛在這上面碰到了一堵牆,你知道是否有任何方法讓Electron從本地主機服務? – user1787531