Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

151
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!