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

139
Views
Can we reuse the access tokens retrieved from the firebase and can we get the user data only from those tokens?

So, I have an electron app and electron apps do not support the firebase/google auth by default. So my question is that I have 1 web app in which I'm using firebase auth. By using firebase auth, I'm using google sign in with it. Now the problem is that I have an electron app in which I want my user to login but since we can't use firebase auth inside electron app, I want that my user should login on the web app, and copy the generated access token from there in to the electron app. So, will it work? I'm getting the token like this:

        const credential =
        GoogleAuthProvider.credentialFromResult(result);
    const token = credential.accessToken;

If this access token can be used in any application then how do I get the user's e-mail ID, name etc via any application? Any example/guidance will be really appreciated. My code snippet is below:

signIn = () => {
    signInWithPopup(this.auth, this.provider)
        .then((result) => {
            // This gives you a Google Access Token. You can use it to access the Google API. 

//How do I access the google API only via access token? const credential = GoogleAuthProvider.credentialFromResult(result); const token = credential.accessToken; // The signed-in user info. const user = result.user; // ... console.log(token); console.log(user); alert( Dear ${user.displayName}, you are signed in successfully, ); }) .catch((error) => { // Handle Errors here. const errorCode = error.code; const errorMessage = error.message; // The email of the user's account used. const email = error.email; // The AuthCredential type that was used. const credential = GoogleAuthProvider.credentialFromError(error); // ... alert(Error while signing in: ${error}); }); };

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!