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

140
Views
Should you store Google Access Tokens?

What is the best way to handle Google Access Tokens?

I'm creating a Chrome app in React that uses Firebase Auth. After authenticating, an access token is returned which I then save to state and pass that state as a prop to a component that accesses the Google Drive API:

signInWithPopup(auth, provider)
      .then((result) => {
        const credential = GoogleAuthProvider.credentialFromResult(result);
        const token = credential.accessToken;
       }

It works great until the user refreshes the page at which point state resets and the component no longer has access to the token.

My plan was to store the token to local storage and then delete is when the user logs out.

Is this the proper way to about it or is there a better way? Thank you!

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!