ALL ARTICLES
ENGINEERING NOTEJune 22, 20261 min read

Demystifying OAuth 2.1 and OpenID Connect at the Edge

Implementing PKCE, securing session cookies in Server Components, and configuring stateless JWT token rotation schemes.

Modern security best practices advise against storing access tokens in client-side localStorage. Using Backend-for-Frontend (BFF) architecture secures tokens at the server edge.

This post explains setting up HttpOnly, secure, Lax cookies in Next.js Middleware and rotating tokens using refresh tokens before they expire.

Shubham Mukherjee
WRITTEN BY

Shubham Mukherjee

Full Stack & AI Engineer crafting high-performance web applications and intelligent machine learning systems.