Skip to content

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.

Notifications You must be signed in to change notification settings

HarinduA/react-dotnet-jwt-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

React + ASP.NET Core JWT Authentication

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.


πŸ” Features

  • βœ… 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

πŸ“¦ Tech Stack

  • 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

πŸš€ Getting Started

1️⃣ Clone the Repo

git clone https://github.com/yourusername/react-dotnet-jwt-auth-poc.git
cd react-dotnet-jwt-auth-poc

dependencies
npm install

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published