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

150
Vistas
Login using Google auth - open in new tab (or open default browser in electron)

I am following this google API docs to login on web apps (without going through backend)

I am on this:

const GoogleAuth = gapi.auth2.getAuthInstance();
GoogleAuth.signIn();

and my gapi.init/gapi.load looks like this:

      gapi.load('auth2', () => {
        gapi.auth2.init({
          client_id: clientId,
          scope: scope.join(' '),
          ux_mode: 'redirect',
          redirect_uri: '<my reirect uri>',
        });
      });

without ux_mode=redirect and redirect_uri this code works and opens a popup, however I'm on an electron app and popup is not allowed by google. I can't change the user agent as well (because it would produce some issues for us on other stuff).

Adding ux_mode=redirect would redirect the electron screen to the google page, and I don't want this, I want it so it will open the default web browser instead (I have a webpage that handles web protocol and stuff).

Any ideas?

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