Files
dancefinder-app/plugins/auth0.ts
T

12 lines
345 B
TypeScript
Raw Normal View History

2024-02-05 16:48:02 +01:00
import { createAuth0 } from '@auth0/auth0-vue'
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)
})