codingstairs
NotesEDULifeContact
⌕Search⌘K
koen

Navigation

  • Intro
  • Blog
  • Life

Get in touch

Send without signing in. Add your email if you'd like a reply.

  • Leave a message anonymously →
  • ✉ warragon112@gmail.com
  • KakaoTalk Open Chat ↗

© 2026 codingstairs

  • Notes
  • EDU
  • Search
  • Life
  • Contact
  • Legal
  • RSS
  • GitHub
EDU›Web security foundations — JWT · OAuth · OWASP

Web security foundations — JWT · OAuth · OWASP

Practical security in seven steps — auth, validation, headers, CORS, email verification.

Start with Step 1 →
Difficulty
intermediate
Lessons
7

Web security foundations — JWT · OAuth · OWASP

Most of OWASP Top 10 is handled by popular frameworks by default, but boundary and trust decisions still fall on the developer. A handful of concrete patterns shrink the attack surface a lot.

Who it's for

  • Developers without a clear sense of "how far is enough" on security
  • Teams that adopted JWT · OAuth but are nervous about mistakes
  • Anyone wanting to set CORS, headers, and rate limits properly

What you can do afterwards

  • Design JWT rotation · refresh tokens · blacklist
  • Handle OAuth state · PKCE · CSRF
  • Validate input with zod + length caps
  • Apply Redis-based rate limiting (sliding window)
  • Configure security headers · CSP · CORS
  • Harden anonymous forms with honey-pot · IP hashing
  • Verify email with OTP — generation, verification, resend throttling

Flow

[1] Threat model ──▶ [2] JWT ──▶ [3] OAuth ──▶ [4] Input validation
                                                      │
                                                      ▼
                   [7] OTP ◀── [6] Form hardening ◀── [5] Rate + CSP

Steps 1–3 deal with who is coming in (auth), 4–5 with how requests are throttled, and 6–7 with the special cases of anonymity and verification.

Steps

  1. Threat model · OWASP at a glance — Top 10 · real incident distribution
  2. JWT · refresh · rotation — HS256 vs RS256 · expiry · blacklist
  3. OAuth + state · PKCE — Kakao · Naver · CSRF
  4. Input validation + length caps — zod · Valibot · payload flood defence
  5. Rate limit + CORS + security headers — Redis sliding window · CSP · sameSite
  6. Anonymous form hardening — honey-pot · IP hash · status flow
  7. Email verification and OTP — SMTP · app password · OTP generation/verification · rate limiting

Prerequisites — complete either backend-with-spring or nextjs-fullstack.

Lessons

  1. 1

    Threat model · OWASP at a glance

    →
  2. 2

    JWT · refresh · rotation

    →
  3. 3

    OAuth + state · PKCE

    →
  4. 4

    Input validation + length caps

    →
  5. 5

    Rate limit + CORS + security headers

    →
  6. 6

    Anonymous form hardening

    →
  7. 7

    Step 7 — Email Verification and OTP

    →

Other courses

All courses →
  • Getting Started with a Dev Environment
  • From HTML/CSS/JS to React, Next.js, Tailwind
  • Build Your First Fullstack App with Next.js 16
  • Backend with Spring Boot 4
  • Python · FastAPI · Data Pipelines
  • AI-native developer tooling — Claude Code · MCP · design tools
  • Docker · Caddy · Cloud — 10 deploy options
  • Central admin platform — many domains behind one hub
  • Local LLM · pgvector · building a RAG chatbot
  • Tauri 2 — desktop · mobile in one codebase
  • Testing strategy and quality gates
  • PostgreSQL in depth + Redis · Kafka
  • Building public-data crawlers
  • Monorepo · SSOT · layer separation thinking