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

244
Vistas
How to get Google API refresh token from Firebase Auth?

I'm building a chrome extension in React using Firebase Auth for login. The google api access token expires after 1 hour and I can't use the gapi client library in a chrome extension.

As such I'm manually refreshing the token by calling google's api. However, how do I get access to the refresh token?

According to this post, a refresh token is returned only after the first sign in, so I used the instructions to remove access and re-prompt permissions. Console.logging credential returned the following but no refresh token:

accessToken: "ya29..."
idToken: "eyJhbGciOiJSUz..."
pendingToken: null
providerId: "google.com"
signInMethod: "google.com"

Sign In code:

const login = async () => {
    signInWithPopup(auth, provider)
      .then((result) => {
        // This gives you a Google Access Token. You can use it to access the Google API.
        const credential = GoogleAuthProvider.credentialFromResult(result);
        const token = credential.accessToken;
}

Any idea how to get the google api refresh token?

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