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.
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>
npm install
npm run dev # or: npm run build && npm startDeploy the example using Vercel: