Series Overview
Complete authentication and security guide for modern web applications: OAuth 2.1, Payload CMS auth plugins, cookie-based sessions, token refresh, API security, and production-ready implementations across Next.js, Payload CMS, Shopify, and MCP servers.
All Articles in Series

Build a Secure Email Pipeline in Next.js
Learn how to send secure transactional emails using Brevo without exposing your SMTP credentials.
Discover how to create a secure server-only email pipeline in Next.js that handles forms and sends notifications without risking credentials.

Payload CMS Auth Plugins: Which One Should You Use?
Compare Auth.js, authsmith and Better Auth to pick the right OAuth, SSO, SAML or 2FA solution for Payload CMS.
Choose the right Payload CMS auth plugin—Auth.js, authsmith, Better Auth, payload-oauth2 or payload-totp—to match your OAuth, SSO, SAML or 2FA requirements.

Build an IP Intelligence Firewall for Newsletter Signups
Protect Your Newsletter with Advanced IP Filtering Techniques
Learn how to build an IP intelligence firewall to protect your newsletter signups from spam and abuse. Perfect for Next.js developers!

Payload CMS Cookie Auth: 7 Troubleshooting Secrets for Next.js
Implement Payload CMS HTTP-only cookie auth with Next.js App Router: CSRF, sessions, CORS, and subdomain cookies.
Secure customer portals with Payload CMS cookie auth and Next.js: setup HTTP-only cookies, CSRF/CORS, sessions, and production fixes to stop silent 401s.

Persist Google OAuth Refresh Tokens with Next.js & Redis
Step-by-step Next.js guide using Upstash Redis to secure offline Google OAuth refresh tokens and enable background API…
Persist Google OAuth refresh tokens using Next.js and Upstash Redis to preserve refresh_token for offline access — secure background integrations without user…