Firebase: This domain is not authorized

前端 未结 9 1388
[愿得一人]
[愿得一人] 2020-12-23 14:11

I imported Firebase JS v3 API and used to initialize Firebase using:

firebase.initializeApp(config);

However the app failed to load correct

9条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-23 14:26

    Make sure the "authDomain" in your config matches the one in your firebase console. If you're running the app on localhost, make sure it's set to localhost and localhost exists on your firebase console.

    Auth -> Sign In Method -> OAuth redirect domains

    var config = {
        apiKey: "...",
        authDomain: "...", // this should match the one on your firebase console
        databaseURL: "...",
        storageBucket: "",
    };
    firebase.initializeApp(config);
    

提交回复
热议问题