auth0 / auth0-vue

Auth0 authentication SDK for Vue.js apps
Other
140 stars 27 forks source link

nuxtjs connection #423

Open JackDurden00 opened 1 month ago

JackDurden00 commented 1 month ago

Checklist

Description

I'm trying to connect with 'auth0-vu'

in a ts file before loading my view.

`import { defineNuxtPlugin } from '@nuxtjs/composition-api' // Utilisation du composition API pour Nuxt 2 import { createAuth0 } from '@auth0/auth0-vue'

export default defineNuxtPlugin((context, inject) => { const config = { domain: 'dev*****com', clientId: 'M3**22H', authorizationParams: { redirect_uri: ${window.location.origin}/listGroups, }, }

const auth0 = createAuth0(config) console.log('Auth0 instance created:', auth0)

//context.app.use(auth0) inject('auth0', auth0) }) `

but auth0 still in loading and i try to use loginWithRedirect or another function, its still undefined.

i put a loop for wait the loading but it doesn't end

Reproduction

import { defineNuxtPlugin } from '@nuxtjs/composition-api' // Utilisation du composition API pour Nuxt 2 import { createAuth0 } from '@auth0/auth0-vue'

export default defineNuxtPlugin((context, inject) => { const config = { domain: 'dev*****com', clientId: 'M3**22H', authorizationParams: { redirect_uri: ${window.location.origin}/listGroups, }, }

const auth0 = createAuth0(config) console.log('Auth0 instance created:', auth0)

//context.app.use(auth0) inject('auth0', auth0) })

Additional context

No response

auth0-vue version

"@auth0/auth0-vue": "^2.3.3",     "@nuxtjs/auth": "^4.9.1"

Vue version

"vue": "^2.7.10",

Which browsers have you tested in?

Chrome