How to customize domain name of firebase database, auth and storage?

后端 未结 2 2016
花落未央
花落未央 2021-01-13 11:25

I know that I can customize domain name for firebase hosting. But how can I customize the firebase database, auth and storage domain name? eg.

authDomain: ex         


        
相关标签:
2条回答
  • 2021-01-13 12:18

    Did you also change the firebase script snippet in your code?

    <script src="https://www.gstatic.com/firebasejs/4.4.0/firebase.js"></script>
    <script>
      // Initialize Firebase
      var config = {
        apiKey: "yourkey",
        authDomain: "auth.example.com",
        databaseURL: "https://db.example.com",
        projectId: "yourid",
        storageBucket: "storage.example.com",
        messagingSenderId: "id"
      };
      firebase.initializeApp(config);
    </script>
    
    0 讨论(0)
  • 2021-01-13 12:25

    Firebase doesn't offer the ability to whitelabel our services under your own domain.

    You could choose to proxy all traffic through Hosting + Cloud Functions, but that would be a significant amount of additional work.

    What is the need to offer your own custom domain on these services?

    0 讨论(0)
提交回复
热议问题