An example of authentication using React JS Context API.
Huge thanks to Akash Thakur for this article, on which this code is based. This repo will eventually deviate from the code in his article, after the tasks in the to do list below are ticked off.
- Code-splitting and organisation
- Add JWT and refresh token compatibility
- Add an API to use as an example
- Clone this repo with
git clone https://github.com/sam-cross/react-context-auth-example <your-chosen-directory>
- Remove the origin remote with
git remote rm origin
- Add your new origin remote with
git remote add origin <your-git-repo-url>
- Push to your new repo with
git push -u origin main
, then start developing!