Recipes
Next.js — first integration
← All recipes · First time? Set up your app (60 seconds — keys + redirect URI)
A hello-world Next.js (App Router) app that signs a user in via Authaz Sign-In, lands them on a protected page, and lets them log out. Single-tenant, password provider, no roles.
1. What you'll build#
A Next.js 15 app where / is public, /dashboard is protected, and the user's email and ID come from Authaz over OAuth 2.1 + PKCE.
2. Application setup#
In the Authaz Dashboard:
- New application → name it, choose Single-tenant.
- Note the Client ID and Client Secret.
- Under Auth Flow Configuration, add
http://localhost:3000/auth/callbackas an allowed callback URL. - Authentication → Password → leave defaults (auto-enabled).