I am trying to follow the guide for integrating
auth0-spa-js in my VueJs app at https://auth0.com/docs/quickstart/spa/vuejs/01-login. The guide walks through creation of a plugin for Vue. What seems strange is that the
auth0Client instance that gets attached to the Vue instance, via
Vue.prototype is created inside the
created lifecycle hook. This makes things difficult as creating the instance synchronously becomes way difficult as we cannot expect the lifecycle of the App itself to be after the lifecycle of the plugin. So, if we are checking for the
auth0Client in our
created hook, there is a chance that it might not be created.