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

105
Views
fetching private repositories from GitHub app

I'm building a web app that integrates with GitHub API (authentication). I'm trying to fetch the user's repositories both public and private. But both without accessToken and with accessToken return public repos only.

  1. authentication

  const provider = new GithubAuthProvider();
  provider.addScope('repo');

  const PopupSignIn = async () => {
     const result = await signInWithPopup(auth, provider);
     const credential = GithubAuthProvider.credentialFromResult(result);
     setToken(credential.accessToken)
     return credential;
  };
  1. fetching repositories
    user here is the auth credential got from getAuth()
PopupSignIn().then(() => {
   fetch(
      `https://api.github.com/users/${user.reloadUserInfo.screenName}/repos`,
      { headers: { authorization: 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!