2024-02-05 16:48:02 +01:00
|
|
|
import { createAuth0 } from '@auth0/auth0-vue'
|
2025-06-13 15:21:27 +02:00
|
|
|
|
2024-02-05 16:48:02 +01:00
|
|
|
import { defineNuxtPlugin } from '#app'
|
|
|
|
|
import { envConfig } from '~/utils/environment'
|
|
|
|
|
|
|
|
|
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
|
|
|
const options = envConfig(window.location.hostname).auth
|
|
|
|
|
const auth0 = createAuth0(options)
|
|
|
|
|
nuxtApp.vueApp.use(auth0)
|
|
|
|
|
nuxtApp.provide('auth0', auth0)
|
|
|
|
|
})
|