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

    Incorporating vue-msal-browser

    Help
    2
    3
    513
    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.
    • M
      MarcP last edited by

      Hi,

      Very new to the Quasar Framework and Vue.Js (and web dev in general), but enjoying the experience so far! I am attempting to incorporate the vue-msal-browser plugin into a Quasar v2.0.0 beta9 application through the boot files. The required msal configuration is maintained in the msal store. My boot/auth.js looks like this:

      import msalPlugin from 'vue-msal-browser'
      
      export default ({ app, store }) => {
        app.use(msalPlugin, store.state.msal.msalConfig)
      }
      

      The error message encountered is:

      client-entry.js:86 [Quasar] boot error: TypeError: Cannot set property '$msal' of undefined
          at Function.install (msalPlugin.js:7)
          at Object.use (runtime-core.esm-bundler.js:2950)
          at Array../src/boot/auth.js.__webpack_exports__.default (auth.js:4)
          at start (client-entry.js:70)
      

      The code in the vue-msal-browser plugin calls this within the install function:

      vue.prototype.$msal = msalInstance;
      

      Do I need to do anything to make the Vue instanace aware of the prototype.$msal property? I hope I’m on the right track with this, maybe it’s something simple 🙂

      Appreciate any help!

      Marc

      1 Reply Last reply Reply Quote 0
      • M
        MarcP last edited by

        I just realized that vue.prototype would be a vue2 thing. Modified the package on my local machine to do “vue.config.globalProperties.$msal = msalInstance;” instead and this seems to have resolved that problem.

        1 Reply Last reply Reply Quote 0
        • Lurrik
          Lurrik last edited by

          I’ll admit that I’m a little lost to incorporate msal, I’m trying to use azure in my quasar app…

          Appreciate any help! ^^

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