Files
cfw-autumn/apps/sdk-test/lib/autumn/autumnHandler.ts
John Yeo e8366d22ea latest
2026-02-18 16:24:19 +00:00

12 lines
407 B
TypeScript

import { autumnHandler } from "autumn-js/backend/next";
import { SDK_TEST_IDENTITY } from "./testIdentity";
/** Set to true to simulate an unauthenticated user */
const SIMULATE_UNAUTHENTICATED = false;
export const handler = autumnHandler({
secretKey: process.env.AUTUMN_SECRET_KEY,
baseURL: "http://localhost:8080",
identify: async () => (SIMULATE_UNAUTHENTICATED ? null : SDK_TEST_IDENTITY),
});