No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Firebase with Microsoft Azure AD authentication

    Help
    1
    1
    229
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DarkLite1
      DarkLite1 last edited by DarkLite1

      I’m trying to set up my app to use Azure AD authentication together with Firebase. I think I’ve covered all the prerequisites:

      In the project folder

      • Install Firebase
      npm install --save firebase
      
      • Create a new boot file “/boot/firebase.js”
      quasar new boot firebase
      
      • Add the firebase boot file to “./quasar.conf.js”
      boot: [
         'firebase'
       ],
      

      In the Azure portal

      • Get the “Application (client) ID” from the “App registrations”
        bfbb1418-ff37-4de3-be2b-c9cb0c67e504-image.png

      • Set the “Redirect URI” and “Implicit grant”
        9ee4f328-0985-4175-8442-f8cb23116c9d-image.png

      • Create a secret key for Firebase to access the Azure app
        f50ccbc9-4293-459a-ab49-9a491e5f3b9c-image.png

      In the Firebase console

      • Add the authentication type “Microsoft” with the “Applicatino (client) ID” and the “secret” generated
        cdc0cb93-fcaf-4d02-90ad-b7a5ab722464-image.png

      In the project

      • Add the Microsoft “provider” and the “Firebase config”:
      import * as firebase from "firebase/app"
      import "firebase/auth"
      
      const firebaseConfig = {
        apiKey: process.env.FIREBASE_API_KEY,
        authDomain: process.env.FIREBASE_AUTH_DOMAIN,
        databaseURL: process.env.FIREBASE_DATABASE_URL,
        projectId: process.env.FIREBASE_PROJECT_ID,
        storageBucket: process.env.FIREBASE_STORAGE_BUCKET,
        messagingSenderId: process.env.FIREBASE_MESSAGING_SENDER_ID,
        appId: process.env.FIREBASE_APP_ID,
        measurementId: process.env.FIREBASE_MEASUREMENT_ID
      }
      let firebaseApp = firebase.initializeApp(firebaseConfig)
      
      let provider = new firebase.auth.OAuthProvider('microsoft.com');
      
      firebaseApp.auth().signInWithRedirect(provider);
      
      export { provider }
      

      At this point I’m probably doing something wrong. According to the Firebase docs, it’s a literal copy/past.

      I’m also wondering how I can call the logon method in my component. Thank you for any help you can give me.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post