Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

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