Skip to content

Latest commit

 

History

History
46 lines (27 loc) · 1006 Bytes

README.md

File metadata and controls

46 lines (27 loc) · 1006 Bytes

OAuth in SPA React with authkeeper

Demo

https://authkeeper-spa.vercel.app/

demo-ssr-react.mp4

Setup

git clone https://github.com/VaibhavUpreti/authkeeper.git  

Navigate to the codebase

cd authkeeper
cd demo/ssr-express-demo

Install required packages

npm i

Setup OAuth Provider(eg. Auth0)

  1. Create a new Oauth application in Auth0 dashboard, type- regular web app.

  2. Export required client crediantials(id) to .env file, refer to .env.example.

  3. Under settings, -> application uri, set the following values for callback, logout and web origins.

  4. Under settings, -> Refresh Token Rotation enable allow refresh tokens.(IMP- It is important to setup a refresh token mechanism before using refresh tokens in production) refer

Start npm development server

npm run dev

Navigate to http://localhost:5500/ to access the application.