Skip to content

Latest commit

 

History

History

README.md

Authorizer + Next.js 13 (App Router) + Tailwind CSS Example

This example shows how to use Authorizer with the Next.js 13 app router. It uses @authorizerdev/authorizer-react v2 and @authorizerdev/authorizer-js v3.

Configuration

Update config/authorizer-config.js with your instance details:

export default {
  authorizerURL: 'https://your-instance.example.com', // Base URL of your Authorizer instance
  redirectURL: 'http://localhost:3000', // URL to redirect to after login
  clientID: 'YOUR_CLIENT_ID', // Client ID from the Authorizer dashboard
};

The SDK stylesheet is imported in app/layout.js:

import '@authorizerdev/authorizer-react/styles.css';

Authorizer v2 server is configured entirely via CLI flags (no .env / OS env vars), e.g. ./authorizer --database-type sqlite --database-url authorizer.db --admin-secret <secret>

Run

npm install
npm run dev   # or: npm run build && npm start

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel