Next.js (Pages Router)

Connect Wristband to your Next.js Pages Router server using our SDKs.

This guide shows you how to add Wristband to Next.js.

Goals

By the end of this guide, you will be able to:

  • Integrate your Next.js backend with Wristband using Wristband's Next.js Auth SDK in the Pages Router.
  • Implement session management with your Next.js backend.
  • Enforce authentication checks in your React frontend utilizing Wristband's React Client Auth SDK.
  • Protect your application's pages and APIs by verifying that the user has an authenticated session.

Prerequisites

  • Node.js (v20.x or later)
  • A package manager such as npm, yarn, or pnpm
  • Next.js (v14.x or later)
  • React (v18.x or later)

Set Up Next.js

For new applications, use the Next.js Pages Router installation instructions to set up your workspace first.



What’s Next

After your Next.js server is set up, you'll need to install the Wristband Auth SDK.

Did this page help you?