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

395
Vistas
Google sign in response_type=code not working

I am implementing google sign-in in my Nuxtjs project and response_type:'code' is not working either in ux_mode:'popup' nor ux_mode:'redirect' in both modes when I check the url reponse_type is equal to permission not code even though I have specified it should be code, in popup mode the popup closes and return popup closed by user error and in redirect mode if I change response_type to code in the url then everything works well so it just needs to be code for everything to work.

here is my google sign in code:

<button role="button" class="btn-social" @click.stop="signInWithGoogle()">
  <img src="~/assets/icons/google.svg" alt="" class="lg:block hidden">
  With Google
</button>

the method:

signInWithGoogle() {
  gapi.auth2.getAuthInstance().signIn();
}

and the initialization:

gapi.load('client:auth2', () => {// callback function});
  gapi.client.init({
    clientId: process.env.GOOGLE_CLIENT_ID,
    discoveryDocs: ['https://www.googleapis.com/discovery/v1/apis/oauth2/v2/rest'],
    scope: 'profile email',
    ux_mode: 'popup',
    redirect_uri: 'http://lvh.me:8000/googleRedirect',
    response_type: 'code',
    access_type: 'offline',
    include_granted_scopes: true,
    prompt: 'select_account',
  });
})

note: I have added URL and redirect URLs in my google console so there is no redirect URI mismatch error.

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