Cerbos integration with React app for authorisation
Developed with the software and tools below.
HTTP error 401 for prompt overview
Requirements
Ensure you have the following dependencies installed on your system:
- TypeScript:
version x.y.z
- Clone the repository:
git clone https://github.com/AvinashDalvi89/react-cerbos-demo/
- Change to the project directory:
cd react-cerbos-demo
- Install the dependencies:
npm install
Use the following command to run :
npm start
- Go to /login page user login details are given there.
- Admin and contact page is developed for testing access control using Cerbos API. After login can go to /admin or /contact page to see the access.
- If you wish to test using Cerbos playground then just open /src/lib/Cerbos.tsx change
let usePlayground = true;
it will use playground code. You can use either Cerbos playground API or Cerbos Hub PDP instance or Cerbos local policy API.