This is a proof-of-concept (POC) application demonstrating how to implement secure user authentication using React.js (frontend) and ASP.NET Core Web API (backend) with JWT (JSON Web Tokens). The app includes role-based access control and token handling without using a database.
- β User login with hardcoded credentials
- β JWT issuance and validation
- β
Role-based protected API endpoints (
Admin/User) - β
Secure token handling in frontend (via
sessionStorage) - β React frontend using Axios, Context API, and React Router
- β ASP.NET Core backend with authentication & authorization middleware
- Frontend: React.js, Axios, React Router, Context API
- Backend: ASP.NET Core Web API (.NET 6+), JWT, CORS
- Auth: JSON Web Tokens (JWT) with claims for roles
git clone https://github.com/yourusername/react-dotnet-jwt-auth-poc.git
cd react-dotnet-jwt-auth-poc
dependencies
npm install