Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

146
Vistas
this.$auth0.loginWithRedirect is not a function

I am following the Auth0 quick start with Vue for my Quasar Project

MainLayout.vue

I have a login button <div><button @click="login">Log in</button></div> for this component

<script>
import { defineComponent, ref } from 'vue'
import EssentialLink from 'components/EssentialLink.vue'

export default defineComponent({
  name: 'MainLayout',

  components: {
    EssentialLink
  },

  methods: {
    login () {
      this.$auth0.loginWithRedirect();
    }
  },

  setup () {
    const leftDrawerOpen = ref(false)

    return {
      essentialLinks: linksList,
      leftDrawerOpen,
      toggleLeftDrawer () {
        leftDrawerOpen.value = !leftDrawerOpen.value
      }
    }
  }
})
</script>

src/boot/auth0.js

I tried to register the plugin to my quasar bootfile (equivalent to main.js) auth0.js

import { boot } from 'quasar/wrappers'
import { createAuth0 } from '@auth0/auth0-vue'

let auth0 =  createAuth0({
    domain: "ksadhkajshds",
    client_id: "askasahsaksj",
    redirect_uri: window.location.origin,
})

export default boot(({ app }) => {
    app.config.globalProperties.$auth0 = auth0
})

export { auth0 }

quasar.config.js

I added the bootfile to my config

// code omitted
boot: [
      
      'auth0',
      'axios',
    ],
// code omitted
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It seems like the documentation indicates you should use app.use to register auth0 in your main.js

import { createAuth0 } from '@auth0/auth0-vue';

const app = createApp(App);
 
app.use(
  createAuth0({
    domain: "YOUR_DOMAIN",
    client_id: "YOUR_CLIENT_ID",
    redirect_uri: window.location.origin
  })
);

app.mount('#app');
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda