hi
trying to implement auth0 into an existing Vue 3 app, i added the files following the tutorial, installed everything and updated my main.js file to look like this:
import { domain, clientId, audience } from "../auth_config.json";
import { Auth0Plugin } from "./auth";
//import { createApp } from "vue";
import * as Vue from "vue";
import router from "./router";
import App from "./App";
import appInfo from "./app-info";
//Install the authentication plugin here
Vue.use(Auth0Plugin, {
domain,
clientId,
audience,
onRedirectCallback: (appState) => {
router.push(
appState && appState.targetUrl
? appState.targetUrl
: window.location.pathname
);
},
});
const app = Vue.createApp(App);
app.use(router);
app.config.globalProperties.$appInfo = appInfo;
app.mount("#app");
but the app breaks (in chrome devtools) with the error:
main.js:13 Uncaught TypeError: vue__WEBPACK_IMPORTED_MODULE_8__.use is not a function
pointing at row 13 (the row with “Vue.use(Auth0Plugin, {…” above)
anyone has an idea what am i missing?
thanx,
EM