This is YAML frontmatter – Contentlayer reads this directly
title: Next.js to Drupal Authorization date: 2025-03-15 author: Jeff Petersen category: technology tags:
- next.js
- react
- frontend
- development excerpt: Options for setting up Drupal as authorization for your Next.js project. readingTime: 10 min featured: true coverImage: /img/hero.jpg
| # | Solution | Effort | Security | Recommendation |
|---|---|---|---|---|
| 1 | Keep Password Grant (with the extra module) | 5 min | Weak | Only for quick prototypes |
| 2 | Switch to built-in Drupal session authentication (cookie-based) + Next.js middleware | ~2–4 hours | Very good | Best for most Next.js + Drupal sites in 2025 |
| 3 | Full OAuth2 Authorization Code + PKCE flow | ~1–2 days | Excellent | Required if you want OpenID Connect, 2FA, social login, etc. |