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

242
Views
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
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!