From 747c153deda586792ebb818dae84e6676e11606f Mon Sep 17 00:00:00 2001 From: "vardy.ng" Date: Wed, 24 Apr 2024 22:25:01 -0400 Subject: [PATCH] improve PAT instruction --- README.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 44236f7..a8a32e7 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,18 @@ npm i react-github-embed ``` -Get your `Personal Access Token` by signing in to your github account and then go to your **setting -> developer setting -> Personal access tokens -> Generate new token**. Add it to `.env` file in the root directory. - -``` -REACT_APP_GITHUB_TOKEN = -``` +### Personal Access Token (PAT) setup +As the package will make request to GitHub GraphQL API, a GitHub PAT is required to authenticate the requests. + +1. Sign in to your GitHub Account +2. Go to [Settings](https://github.com/settings/profile) -> Developer Settings -> Personal access tokens -> [Token (classics)](https://github.com/settings/tokens) +3. Click "Generate new token" -> "Generate new Token (classic)" +4. Give the token a name and set Expiration Date, grant `public_repo` permission +5. Set environment variable with the token: + + ``` + REACT_APP_GITHUB_TOKEN = + ``` ## Demo & Playground