Next.js agent
A Next.js project with an agent route that checks a permission and a route that asks a person for approval.
This page is a draft. The code exists, and not all of it has been run for this page yet. The page says what was checked.
What you get
- Sign-in for the person who uses the agent.
- An agent route that asks LumoAuth before it acts.
- An approval route that sends a request to the phone of the person and waits.
Create it
npx create-lumo-agent my-agent
The command asks for the domain, your organization and the client ID.
Settings
| Variable | Value |
|---|---|
NEXT_PUBLIC_LUMOAUTH_DOMAIN | https://app.lumoauth.dev |
NEXT_PUBLIC_LUMOAUTH_ORG_ID | Your organization. |
NEXT_PUBLIC_LUMOAUTH_CLIENT_ID | The client ID of the application. |
LUMOAUTH_AGENT_TOKEN | A token of the agent. |
Files
| File | What it does |
|---|---|
app/api/agent/route.ts | A permission check before the action. |
app/api/approval/route.ts | An approval request for a wire transfer. |
lib/lumo.ts | The client. |