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

275
Vistas
vue3-google-login button disappeared

I have a really weird problem with my google authentication client in vue3. I‘m using vue3-google-login and got everything to work.

Today when I worked on a completely different part of the app I just found out that the login page, which contains the GoogleLogin component neither shows the google login button nor the login overlay, which is weird because I didn‘t touch it at all, after I implemented it successfully. The only thing I changed project-wide is to install yarn and some packages through it. I also deleted some of the installed packages (tiptap and some extensions) again.

Does anyone have a clue how I can debug this? I got no error messages in the console and the vue dev tool states that the component is loaded.

main.js

import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'
import 'bootstrap/dist/css/bootstrap.css'
import vue3GoogleLogin from 'vue3-google-login'


axios.defaults.baseURL = process.env.NODE_ENV === 'production' ? 'https://productionApi' : 'http://192.168.2.100/api/';

createApp(App)
.use(store)
.use(router)
.use(vue3GoogleLogin, {
    clientId: 'someId'
})
.mount('#app')

import 'bootstrap/dist/js/bootstrap.js'

Login.vue


<template>
    <!-- Google Login -->
    <div v-if="loggedIn == false">
      <GoogleLogin :callback="callback" prompt/>
    </div>
    <div v-else>
      <h1>Welcome {{user.name}}</h1>
      <div @click="logout()" class="btn btn-danger">Abmelden</div>
    </div>
</template>

<script>
export default {
  data() {
    return {
      loggedIn: false,
      user: null,
      callback: (response) => {
        this.$store.dispatch('login', response)
        this.loggedIn = this.$store.getters.isLoggedIn
        console.log("logged in")
        this.$router.push('/')
      }
    }
  },
  mounted() {
    this.loggedIn = this.$store.getters.isLoggedIn
    if (this.loggedIn == true) {
      this.logout()
    }
  },
  methods: {
    logout() {
      console.log("logout")
      this.$store.dispatch('logout')
      this.loggedIn = this.$store.getters.isLoggedIn
      this.$router.push('/')
    }
  }
}
</script>
about 4 years ago · Juan Pablo Isaza
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