• Home
BuildWithMatija
Get In Touch
  1. Home
  2. Series
  3. Payload CMS Authentication & Session Management
Next.js

Payload CMS Authentication & Session Management

5 articles
Hub + 5 spokes

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

H
Build a Secure Email Pipeline in Next.js
HUB1 of 5

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.

6 min readOct 27, 2025By Matija Žiberna
1
Payload CMS Auth Plugins: Which One Should You Use?
PART 12 of 5

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.

7 min readMar 6, 2026By Matija Žiberna
2
Build an IP Intelligence Firewall for Newsletter Signups
PART 23 of 5

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!

15 min readOct 24, 2025By Matija Žiberna
3
Payload CMS Cookie Auth: 7 Troubleshooting Secrets for Next.js
PART 34 of 5

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.

19 min readFeb 19, 2026By Matija Žiberna
4
Persist Google OAuth Refresh Tokens with Next.js & Redis
PART 45 of 5

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…

6 min readDec 21, 2025By Matija Žiberna

Topics Covered

authenticationOAuth 2.1Payload CMS authcookie authsession managementtoken refreshPKCEShopify Customer Account APIMCP securityNext.js authBetter Authauth plugin
←Back to all series

Quick Navigation

Hub: Build a Secure Email Pipeline in Next.jsPart 1: Payload CMS Auth Plugins: Which One Should You Use?Part 2: Build an IP Intelligence Firewall for Newsletter SignupsPart 3: Payload CMS Cookie Auth: 7 Troubleshooting Secrets for Next.jsPart 4: Persist Google OAuth Refresh Tokens with Next.js & Redis

Payload CMS Websites

Your website becomes a structured knowledge system — for customers, employees, and AI.

Learn more

Bespoke AI Applications

Internal tools where AI reduces manual work and connects real business operations.

Learn more

Start a conversation.

Get in touch
Build With Matija Logo

Build with Matija

Matija Žiberna

I turn scattered business knowledge into one usable system. End-to-end system architecture, AI integration, and development.

Quick Links

Payload CMS Websites
  • Bespoke AI Applications
  • Projects
  • How I Work
  • Blog
  • Get in Touch

    Have a project in mind? Let's discuss how we can help your business grow.

    Contact me →
    © 2026BuildWithMatija•Principal-led system architecture•All rights reserved