/react-context-auth-example

An example of authentication with React Context API. See README.md for more info!

Primary LanguageJavaScript

react-context-auth-example

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.

To Do:

  • Code-splitting and organisation
  • Add JWT and refresh token compatibility
    • Add an API to use as an example

Usage

  1. Clone this repo with git clone https://github.com/sam-cross/react-context-auth-example <your-chosen-directory>
  2. Remove the origin remote with git remote rm origin
  3. Add your new origin remote with git remote add origin <your-git-repo-url>
  4. Push to your new repo with git push -u origin main, then start developing!