lukeocodes / lukeocodes/hacktoberfest-checker
auth with GitHub using nuxt auth module
@git-srinivas is already working on this.
Since Oct 22, 2020.
- Dominant language
- JavaScript
- Stars
- 16
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
Editing with info for anyone who wants to help with this one.
There are a few ways to connect to GitHub APIs.
One is using a static personal access token (mine), which is stored as an environment variable and deployed to the Netlify Function (AWS Lambda function) that connects to GitHub.
Another way is to have a user of the site "Login with GitHub", they then get an Acess Token which can be stored in the memory of the frontend application (not in cookies or local storage), then sent through to the Netlify Function whenever they make a request. Not only for this purpose, but it also will provide the users GitHub profile information, to enrich the experience on the site (i.e. they could track their entire Hacktoberfest progress).
There are packages like nuxt-auth that will make some of this work easier, but from my own experimentation, those packages offered incomplete solutions. I believe I was closest with nuxt-auth, which appeared to be using an auth code grant, but I should have created a new Netlify Function to act as the backend to exchange the authorization code for an access token.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.