Skip to content

πŸ” Implemented a secure authentication system with JWT, email/password login, and Google OAuth. πŸ’Ύ Tokens stored in localStorage with role-based access and protected routes.

Notifications You must be signed in to change notification settings

Muzamil-Fatima/Authentication-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”‘ 1. Authentication (WHO are you?)

Authentication is the process of verifying the identity of a user.

  • πŸ” Checks: Are you really the person you claim to be?
  • 🧠 Think: Login System

βœ… Example:

  • You log in to a website using email and password or Google account β†’ You are authenticated.

🧩 Types of Authentication:

Type Description
Password-based Username + password
OTP-based One-time password sent to phone/email
Biometric Fingerprint, Face ID
OAuth Login via Google, GitHub, etc.
Token-based (JWT) Auth via access token after login

πŸ›‘οΈ 2. Authorization (WHAT can you do?)

Authorization is the process of verifying what access/permissions a user has after authentication.

  • πŸ” Checks: Are you allowed to access this resource?
  • 🧠 Think: Permissions, roles

βœ… Example:

  • You're logged in (authenticated), but only admins can access the "Admin Dashboard". If you're not an admin, you're not authorized.

🧩 Types of Authorization:

Type Description
Role-Based (RBAC) Access based on user roles (admin, user, manager)
Attribute-Based (ABAC) Access based on attributes like location, device, time
Permission-Based Specific feature access given to user (e.g., read, write, delete)

πŸ”„ Summary Table:

Feature Authentication Authorization
βœ… Meaning Confirms user identity Grants access rights
πŸ” Happens First step After authentication
πŸ“‹ Example Login with email/password Admin can delete users, user cannot
πŸ§ͺ Methods Password, OTP, OAuth, biometric Roles, permissions, policies
🎯 Focus Who are you? What can you do?

About

πŸ” Implemented a secure authentication system with JWT, email/password login, and Google OAuth. πŸ’Ύ Tokens stored in localStorage with role-based access and protected routes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published