Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Authentication & Authorization System

A full-stack authentication and authorization system built using Angular, ASP.NET Core 8 Web API, SQL Server, and JWT, featuring secure authentication practices including Refresh Token Rotation, HTTP-Only Cookie Authentication, and Google Sign-In with OpenID Connect (OIDC).

This project demonstrates a production-oriented authentication flow by combining modern identity management techniques with secure backend architecture and best practices.

✨ Features

###Authentication

  • User Registration
  • User Login
  • Secure Logout
  • Protected API Endpoints
  • Role-based Authentication Ready

###JWT Authentication

  • JWT Access Token Authentication
  • Refresh Token Authentication
  • Automatic Access Token Renewal
  • Refresh Token Rotation
  • Token Revocation on Logout
  • Secure Token Validation

###Secure Token Storage

  • HTTP-Only Cookies
  • Secure Cookie Configuration
  • Protection against XSS attacks
  • Cookie-based Authentication Flow

###Google Authentication

  • Google Sign-In using OpenID Connect (OIDC)
  • Google Account Registration
  • Existing User Login with Google
  • Automatic User Registration
  • Identity Token Validation
  • Application-specific JWT Generation after Google Authentication

πŸ›  Tech Stack

Frontend

  • Angular
  • TypeScript
  • Angular HTTP Client

Backend

  • ASP.NET Core 8 Web API
  • Entity Framework Core
  • ASP.NET Core Authentication
  • JWT Bearer Authentication

Database

  • SQL Server
  • Entity Framework Core
  • Migrations
  • ADO.NET Core

###Authentication & Security

  • JSON Web Tokens (JWT)
  • Refresh Tokens
  • HTTP-Only Cookies
  • Google OpenID Connect (OIDC)
  • OAuth 2.0

Google Authentication Flow

  1. User clicks Sign in with Google.
  2. Google authenticates the user using OpenID Connect.
  3. The backend validates Google's Identity Token.
  4. If the user is new, an account is automatically created.
  5. If the user already exists, authentication continues normally.
  6. The application generates its own JWT Access Token and Refresh Token.
  7. Tokens are stored securely in HTTP-Only cookies.

πŸš€ Getting Started

Prerequisites

  • .NET 8 SDK
  • Node.js (LTS)
  • Angular CLI
  • SQL Server
  • Visual Studio 2022
  • VS code

πŸ”’ Security Features

  • JWT Access Token Authentication
  • Refresh Token Rotation
  • HTTP-Only Cookie Storage
  • Secure Logout
  • Token Revocation
  • Google OpenID Connect Authentication
  • Identity Token Validation
  • Automatic Access Token Renewal
  • Protection against common client-side token exposure

🀝 Contributing

Contributions, suggestions, and feedback are always welcome. Feel free to fork the repository, open an issue, or submit a pull request.

πŸ‘¨β€πŸ’» Author

SURAJ SINGH If you found this project helpful, consider giving it a ⭐ on GitHub.

About

Production-ready Authentication & Authorization System using Angular, ASP.NET Core 8, JWT, Refresh Tokens, Google OIDC, and SQL Server.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages