Code Like A Girl

Welcome to Code Like A Girl, a space that celebrates redefining society's perceptions of women in…

Follow publication

Member-only story

πŸš€ The Quickest Way to Authenticate GitHub API (Without a Backend) πŸ”‘

πŸ”“ Use a GitHub Personal Access Token (PAT) to increase rate limits and make authenticated API requests.

An AI-generated illustration of a cat securely logging into a system, representing GitHub authentication with a Personal Access Token (PAT).
Cat doing a secure login β€” made by Dalle for this article

I had been wrestling with my GitHub Insights Dashboard for hours β€” fixing bugs πŸ›, tweaking API calls πŸ”„, and convincing myself that the UI was β€œgood enough for now.”

Feeling somewhat accomplished, I sent it to a friend to check out. A few minutes later, they messaged me:

β€œUh… this just shows your stats. Where’s mine?”

That’s when it hit me β€” I had built the entire dashboard without authentication. It only fetched my data because I never implemented a way for users to log in.

I needed a way for any user to log in and see their own GitHub stats.

I tried searching for a solution. β€œUse OAuth.” 😩 Nope. β€œSet up a backend.” πŸ™… Not happening. Then, buried deep in a forum thread, someone casually mentioned GitHub Personal Access Tokens (PATs).

That was it. βœ…

πŸ‘‰ Personal Access Tokens (PATs) to the rescue.
With a newly generated PAT, I could:
βœ… Authenticate API requests without needing a backend
βœ… Make up to 5,000 requests per hour instead of being stuck with 60 (See GitHub’s Rate Limit Documentation)
βœ… Set it up in less than an hour ⏳

Published in Code Like A Girl

Welcome to Code Like A Girl, a space that celebrates redefining society's perceptions of women in technology. Share your story with us!

Written by Jagoda Cubrilo

Software developer specializing in TypeScript/JavaScript. Experienced with Angular, React, Node.js, AWS. Passionate about tech and building projects. πŸš€πŸ’»

No responses yet

Write a response