Add Auth to a Next.js App
:::info Coming Soon This feature is under active development. The design below reflects our planned implementation. :::
This guide will cover integrating Aero2 authentication into a Next.js application using the App Router.
Planned Topics
- Server-side token verification — Verify Aero2 access tokens in Next.js API routes and Server Components
- Middleware for protecting pages — Use Next.js middleware to redirect unauthenticated users to the login page
- React SDK with App Router — Using the Aero2 React components in a Next.js App Router application
- Server Actions — Calling authenticated APIs from Server Actions
Prerequisites
- A Next.js 14+ application using the App Router
- An Aero2 application with API keys
Related
- JavaScript / TypeScript SDK — Client library for browser and Node.js
- React Components — Pre-built UI components for authentication
- Add Auth to a React App — General React integration guide