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

343
Vistas
Chrome extension get auth token without using chrome app

I am trying to get an auth token using:

chrome.identity.getAuthToken({ interactive: false }, function (token) {
    console.log('token', token);
});

token is undefined and I receive the error:

Unchecked runtime.lastError: OAuth2 request failed: Service responded with error: 'bad client id

my manifest json's oauth2 looks like this:

"version": "1.0",
"manifest_version": 3,
"background": {
    "service_worker": "background.js"
},
"oauth2": {
    "client_id": "<my_client_id>.apps.googleusercontent.com",
    "scopes": [
        "profile email",
        "https://www.googleapis.com/auth/userinfo.email",
        "https://www.googleapis.com/auth/drive.file"
    ]
},

I added my client id following the instructions here:

https://developer.chrome.com/docs/extensions/mv3/tut_oauth/#oauth_client

I notice that the instructions say:

On the Create client ID page, select Chrome App

However, chrome apps are being deprecated. So I have two questions, why is my client id bad, and is there a way to auth a user without using a chrome app, as chrome apps are being deprecated.

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