Ad

Ionic App: Firebase Authenticate With Using OAuth Provider Shows AUTH_DOMAIN Instead Of Custom Domain

I implemented a Login with Google API following the Firebase Authentication docs (Authenticate Using OAuth Providers with Cordova) Link. However, it shows the Project Default AUTH_DOMAIN. How do I change it to show custom URL?

<universal-links>
    <host name="example.page.link" scheme="https" />
    <host name="example-app.firebaseapp.com" scheme="https">
        <path url="/__/auth/callback"/>
    </host>
</universal-links>

enter image description here

Ad

Answer

Have you set your domain when adding Firebase to your app?

<script src="https://www.gstatic.com/firebasejs/5.8.2/firebase.js"></script>
<script>
  // Initialize Firebase
  // TODO: Replace with your project's customized code snippet
  var config = {
    apiKey: "<API_KEY>",
    authDomain: "<PROJECT_ID>.firebaseapp.com",
    databaseURL: "https://<DATABASE_NAME>.firebaseio.com",
    projectId: "<PROJECT_ID>",
    storageBucket: "<BUCKET>.appspot.com",
    messagingSenderId: "<SENDER_ID>",
  };
  firebase.initializeApp(config);
</script>

Also, using your own domain is not as easy as it sounds. Check out this post for more info.

Ad
source: stackoverflow.com
Ad