Authentication
Welcome to the Authentication learning hub. This section covers authentication flows, login request handling, security considerations, and production patterns essential for building secure applications.
Articles
Core Concepts
-
- Complete walkthrough from client submission to authenticated session
- Client-side preparation and validation
- Server-side credential verification
- Session creation and token generation
-
- JWT structure: header, payload, signature
- Why Base64URL encoding
- Authentication flow
- Security best practices
-
- jsonwebtoken library usage
- Express middleware for protected routes
- Token refresh pattern
- Implementing logout with blacklist
-
- Why plaintext storage is catastrophic
- Hashing algorithms: bcrypt, Argon2, PBKDF2
- Salt and pepper concepts
- Secure password storage strategies