Backend & API
Authentication
Passwords, JWT, sessions, token refresh, OAuth and e-mail confirmation – safely, step by step.
Article
Backend login and registration – passwords, sessions, JWT, refresh token rotation and OAuth
We build authentication for the pierogi shop API in Express 5 (plus a NestJS variant) – argon2id password hashing, short-lived JWTs and rotated refresh tokens in httpOnly cookies with reuse detection, e-mail verification, password reset, rate limits and lockouts, Google sign-in (OIDC + PKCE) and a checklist based on OWASP ASVS 5.0.
Related articles
- Login and registration in React – forms, tokens, protected routes and session refresh
A complete authentication frontend in React 19 – login and registration forms with validation, an access token in memory and a refresh token in an httpOnly cookie, session restore, protected routes,…
- Amazon SES in practice – domain verification (DKIM, SPF, DMARC), leaving the sandbox, sending via API and SMTP, templates, bounces and deliverability (Node.js, C#, Python)
We send the pierogi shop's e-mails with Amazon SES – a domain identity with Easy DKIM, a custom MAIL FROM domain for SPF, rolling out DMARC, leaving the sandbox, sending via the v2 API with AWS SDK…
Around the topic
- Secure Your .NET API in 15 Minutes: JWT Authentication Tutorial video · youtube · Milan Jovanović
- Federated Identity Pattern article · web · Microsoft Azure Architecture Center
- Building Secure Microservices in Azure - Jimmy Bogard - NDC London 2023 video · youtube · NDC Conferences
- Best Practices for Secure Password Hashing in .NET (Stop Storing Passwords in Plain Text!) video · youtube · Milan Jovanović
- GitHub Copilot X – Sign up for technical preview article · web · Thomas Dohmke
- Zero-Touch OAuth for MCP article · web · Paul Carleton
- Implementing API Gateway Authentication With YARP article · web · Milan Jovanović
- Provide Custom Authentication to Foundry Models Through a Gateway article · web · Microsoft Azure Architecture Center
- OAuth Authentication for the Semaphore MCP Server podcast · apple-podcasts · Semaphore Uncut
- OAuth for MCP Servers — Lessons from Building for AI Agents podcast · apple-podcasts · Semaphore Uncut
- omansak/ASP.NET-CORE-MVC-Sample-Registration-Login repo · github · omansak