passflow 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +67 -2
  3. package/dist/cli.mjs +1759 -0
  4. package/package.json +42 -3
  5. package/skills/REVISION +1 -0
  6. package/skills/index.json +405 -0
  7. package/skills/passflow-nextjs/SKILL.md +205 -0
  8. package/skills/passflow-nextjs/assets/.env.example +5 -0
  9. package/skills/passflow-nextjs/assets/app/account/page.tsx +29 -0
  10. package/skills/passflow-nextjs/assets/app/actions.example.ts +21 -0
  11. package/skills/passflow-nextjs/assets/app/api/me/route.ts +22 -0
  12. package/skills/passflow-nextjs/assets/components/auth-links.tsx +11 -0
  13. package/skills/passflow-nextjs/assets/lib/call-api.example.ts +15 -0
  14. package/skills/passflow-nextjs/assets/lib/passflow.ts +4 -0
  15. package/skills/passflow-nextjs/assets/proxy.ts +10 -0
  16. package/skills/passflow-nextjs/references/guardrails.md +87 -0
  17. package/skills/passflow-nextjs/scripts/index.json +405 -0
  18. package/skills/passflow-nextjs/scripts/lib.sh +1069 -0
  19. package/skills/passflow-nextjs/scripts/verify.sh +467 -0
  20. package/skills/passflow-node-api/SKILL.md +189 -0
  21. package/skills/passflow-node-api/assets/examples/explain-rejection.ts +22 -0
  22. package/skills/passflow-node-api/assets/examples/express-routes.ts +22 -0
  23. package/skills/passflow-node-api/assets/examples/fastify-routes.ts +28 -0
  24. package/skills/passflow-node-api/assets/examples/hono-routes.ts +19 -0
  25. package/skills/passflow-node-api/assets/src/express-cors.ts +11 -0
  26. package/skills/passflow-node-api/assets/src/express.ts +13 -0
  27. package/skills/passflow-node-api/assets/src/fastify-cors.ts +11 -0
  28. package/skills/passflow-node-api/assets/src/fastify.ts +14 -0
  29. package/skills/passflow-node-api/assets/src/fetch-handler.ts +13 -0
  30. package/skills/passflow-node-api/assets/src/hono-cors.ts +11 -0
  31. package/skills/passflow-node-api/assets/src/hono.ts +16 -0
  32. package/skills/passflow-node-api/assets/src/passflow.ts +21 -0
  33. package/skills/passflow-node-api/references/guardrails.md +66 -0
  34. package/skills/passflow-node-api/scripts/index.json +405 -0
  35. package/skills/passflow-node-api/scripts/lib.sh +1069 -0
  36. package/skills/passflow-node-api/scripts/verify.sh +283 -0
  37. package/skills/passflow-react-vite/SKILL.md +225 -0
  38. package/skills/passflow-react-vite/assets/server/express-cors.ts +9 -0
  39. package/skills/passflow-react-vite/assets/server/express.ts +14 -0
  40. package/skills/passflow-react-vite/assets/server/fastify-cors.ts +11 -0
  41. package/skills/passflow-react-vite/assets/server/fastify.ts +15 -0
  42. package/skills/passflow-react-vite/assets/server/hono-cors.ts +8 -0
  43. package/skills/passflow-react-vite/assets/server/hono.ts +17 -0
  44. package/skills/passflow-react-vite/assets/server/passflow.ts +30 -0
  45. package/skills/passflow-react-vite/assets/server/tsconfig.json +14 -0
  46. package/skills/passflow-react-vite/assets/src/passflow.tsx +28 -0
  47. package/skills/passflow-react-vite/assets/src/require-sign-in.tsx +35 -0
  48. package/skills/passflow-react-vite/assets/src/use-api.ts +23 -0
  49. package/skills/passflow-react-vite/references/guardrails.md +82 -0
  50. package/skills/passflow-react-vite/scripts/index.json +405 -0
  51. package/skills/passflow-react-vite/scripts/lib.sh +1069 -0
  52. package/skills/passflow-react-vite/scripts/verify.sh +678 -0
  53. package/skills/passflow-tanstack-start/SKILL.md +182 -0
  54. package/skills/passflow-tanstack-start/assets/.env.example +5 -0
  55. package/skills/passflow-tanstack-start/assets/src/components/auth-links.tsx +10 -0
  56. package/skills/passflow-tanstack-start/assets/src/lib/call-api.example.ts +14 -0
  57. package/skills/passflow-tanstack-start/assets/src/lib/passflow.ts +14 -0
  58. package/skills/passflow-tanstack-start/assets/src/lib/server-functions.example.ts +20 -0
  59. package/skills/passflow-tanstack-start/assets/src/routes/account.tsx +25 -0
  60. package/skills/passflow-tanstack-start/assets/src/routes/api/me.ts +25 -0
  61. package/skills/passflow-tanstack-start/assets/src/start.ts +14 -0
  62. package/skills/passflow-tanstack-start/references/guardrails.md +73 -0
  63. package/skills/passflow-tanstack-start/scripts/index.json +405 -0
  64. package/skills/passflow-tanstack-start/scripts/lib.sh +1069 -0
  65. package/skills/passflow-tanstack-start/scripts/verify.sh +470 -0
@@ -0,0 +1,5 @@
1
+ PASSFLOW_ISSUER=
2
+ PASSFLOW_CLIENT_ID=
3
+ PASSFLOW_CLIENT_SECRET=
4
+ PASSFLOW_SECRET=
5
+ APP_BASE_URL=
@@ -0,0 +1,29 @@
1
+ import { Suspense } from 'react';
2
+ import { AuthLinks } from '@/components/auth-links';
3
+ import { passflow } from '@/lib/passflow';
4
+
5
+ // The page shell is public. Everything that needs a signed-in user renders under <Account>, which checks the
6
+ // session first.
7
+ export default function AccountPage() {
8
+ return (
9
+ <main>
10
+ <h1>Account</h1>
11
+ <Suspense fallback={<p>Loading…</p>}>
12
+ <Account />
13
+ </Suspense>
14
+ </main>
15
+ );
16
+ }
17
+
18
+ async function Account() {
19
+ // Signed out, this redirects to sign-in, which returns to this page.
20
+ const { user } = await passflow.requireSession();
21
+ return (
22
+ <section data-passflow-protected>
23
+ <p>
24
+ Signed in as <span data-passflow-email>{user.email}</span>
25
+ </p>
26
+ <AuthLinks />
27
+ </section>
28
+ );
29
+ }
@@ -0,0 +1,21 @@
1
+ 'use server';
2
+
3
+ import { passflow } from '@/lib/passflow';
4
+
5
+ // Every server action that reads or changes private data starts with requireSession().
6
+ // Signed out, the rest of the action never runs and the browser goes to sign-in.
7
+ export async function saveNote(formData: FormData): Promise<void> {
8
+ const { user } = await passflow.requireSession();
9
+
10
+ const note = formData.get('note');
11
+ if (typeof note !== 'string' || note.length === 0) {
12
+ return;
13
+ }
14
+ await storeNote(user.sub, note);
15
+ }
16
+
17
+ // The app's own data layer goes here.
18
+ async function storeNote(userId: string, note: string): Promise<void> {
19
+ void userId;
20
+ void note;
21
+ }
@@ -0,0 +1,22 @@
1
+ import { passflow } from '@/lib/passflow';
2
+
3
+ // A route handler answers 401 when signed out, never a redirect.
4
+ export async function GET() {
5
+ const session = await passflow.getSession();
6
+ if (session === null) {
7
+ return passflow.unauthorized();
8
+ }
9
+ return Response.json({ user: session.user }, { headers: { 'Cache-Control': 'no-store' } });
10
+ }
11
+
12
+ // A handler that changes data also refuses requests from other sites.
13
+ export async function POST(request: Request) {
14
+ if (!passflow.isSameOrigin(request)) {
15
+ return new Response(null, { status: 403 });
16
+ }
17
+ const session = await passflow.getSession();
18
+ if (session === null) {
19
+ return passflow.unauthorized();
20
+ }
21
+ return new Response(null, { status: 204, headers: { 'Cache-Control': 'no-store' } });
22
+ }
@@ -0,0 +1,11 @@
1
+ import { passflow } from '@/lib/passflow';
2
+
3
+ // Plain <a href>, never <Link>: a prefetching link would run sign-in or sign-out before anyone clicks.
4
+ // It reads the session, so render it inside <Suspense>.
5
+ export async function AuthLinks({ returnTo = '/' }: { returnTo?: string }) {
6
+ const session = await passflow.getSession();
7
+ if (session === null) {
8
+ return <a href={`/auth/login?returnTo=${encodeURIComponent(returnTo)}`}>Sign in</a>;
9
+ }
10
+ return <a href="/auth/logout">Sign out</a>;
11
+ }
@@ -0,0 +1,15 @@
1
+ import { passflow } from '@/lib/passflow';
2
+
3
+ // Server code that calls an API as the signed-in user. The access token goes from this server to the API and
4
+ // nowhere else: return the API's data, never the token. Call it from a server component, a server action or a
5
+ // route handler with a URL the app chose; never mark this file 'use server', which would let the browser pick
6
+ // the URL. The API verifies the token itself.
7
+ export async function fetchAsUser(url: string, init: RequestInit = {}): Promise<Response | null> {
8
+ const token = await passflow.getAccessToken();
9
+ if (token === null) {
10
+ return null;
11
+ }
12
+ const headers = new Headers(init.headers);
13
+ headers.set('Authorization', `Bearer ${token}`);
14
+ return fetch(url, { ...init, headers, cache: 'no-store' });
15
+ }
@@ -0,0 +1,4 @@
1
+ import { createPassflow } from '@passflow/nextjs';
2
+
3
+ // Reads PASSFLOW_ISSUER, PASSFLOW_CLIENT_ID, PASSFLOW_CLIENT_SECRET, PASSFLOW_SECRET and APP_BASE_URL on first use.
4
+ export const passflow = createPassflow();
@@ -0,0 +1,10 @@
1
+ import type { NextRequest } from 'next/server';
2
+ import { passflow } from './lib/passflow';
3
+
4
+ // Serves /auth/login, /auth/callback and /auth/logout, and refreshes the session. It protects nothing by itself:
5
+ // every page and route handler checks the session in its own server code.
6
+ export function proxy(request: NextRequest) {
7
+ return passflow.proxy(request);
8
+ }
9
+
10
+ export const config = { matcher: ['/((?!_next/static|_next/image|favicon.ico).*)'] };
@@ -0,0 +1,87 @@
1
+ # Guardrails: Next.js
2
+
3
+ Read this before you edit any auth code in the app. Each rule says what to do, why, what to do instead, and whether `scripts/verify.sh` checks it. On the developer's machine you run `verify.sh`; in a Passflow GitHub App run you check your work with `run_build()` and `run_typecheck()`, the runner runs `verify.sh static` after you finish, and the developer runs `verify.sh run` on their machine before merging.
4
+
5
+ ## 1. Check the session in server code, never in the proxy alone
6
+
7
+ - **Rule:** every page, layout, server action and route handler that shows or changes private data calls `passflow.requireSession()` or `passflow.getSession()` itself.
8
+ - **Why:** the proxy can be skipped. A request header once let callers bypass Next.js middleware entirely (CVE-2025-29927), and a narrow `matcher` silently leaves paths out. The proxy serves the auth routes and refreshes the cookie; it is not the security check.
9
+ - **Instead:** never add a "signed in?" redirect to `proxy.ts` and stop there. Put the call in the code that reads the data.
10
+ - **Checked:** `verify.sh run` requests the protected page and route handler with no cookie.
11
+
12
+ ## 2. Close the backend, not only the page
13
+
14
+ - **Rule:** a server action or route handler that a protected page calls checks the session on its own.
15
+ - **Why:** server actions and route handlers are HTTP endpoints. Anyone can call them without loading the page that shows the button.
16
+ - **Instead:** server actions start with `const { user } = await passflow.requireSession();` (`assets/app/actions.example.ts`). Route handlers call `getSession()` and return `passflow.unauthorized()` when `session === null` (`assets/app/api/me/route.ts`). A route handler never calls `requireSession()`: it must answer 401, not redirect to an HTML page.
17
+ - **Checked:** `verify.sh run` expects 401 with `Cache-Control: no-store` from the route handler.
18
+
19
+ ## 3. With cacheComponents, protected content renders only under the component that checks
20
+
21
+ - **Rule:** everything that needs a signed-in user is rendered inside the async component that calls `requireSession()`, and that component sits in `<Suspense>`.
22
+ - **Why:** with `cacheComponents: true`, the part outside `<Suspense>` is prerendered once and sent to every visitor. The redirect for a signed-out visitor can arrive in the stream after a 200, so the status code proves nothing.
23
+ - **Instead:** keep the page shell to layout, as `assets/app/account/page.tsx` does. Never call `getSession()` or `requireSession()` inside `'use cache'`. `<AuthLinks />` reads the session too, so it also renders inside `<Suspense>`.
24
+ - **Checked:** `verify.sh run` fails when the signed-out page's body contains `data-passflow-protected`. Put that attribute on the element that holds the protected content of the page you check.
25
+
26
+ ## 4. No secret in a `NEXT_PUBLIC_` variable
27
+
28
+ - **Rule:** `PASSFLOW_CLIENT_SECRET` and `PASSFLOW_SECRET` keep their names. Nothing named `NEXT_PUBLIC_…SECRET` exists, and no secret's value is copied into a public variable.
29
+ - **Why:** Next.js inlines every `NEXT_PUBLIC_` value into the JavaScript sent to the browser.
30
+ - **Instead:** read secrets in server code only. The package reads them itself; the app does not need to.
31
+ - **Checked:** `verify.sh static` fails on a `NEXT_PUBLIC_…SECRET` name in the source, on either secret's name or value in the client bundle (`.next/static`), and on either secret's value in the prerendered pages (`.next/server/app`). The values come from `.env.local` and from the process environment, and are never printed.
32
+
33
+ ## 5. Tokens stay on the server
34
+
35
+ - **Rule:** no access token in `localStorage`, `sessionStorage`, a non-HttpOnly cookie, a server action's return value, a client component's props or a log line. `getAccessToken()` is called only by server code that sends the token to an API.
36
+ - **Why:** anything the browser can read, an injected script can read. A `Session` holds no token for this reason; a token returned from a server action is serialized into the page.
37
+ - **Instead:** pass `session.user` (or fields of it) to client components. Call the API from server code through `fetchAsUser` in `assets/lib/call-api.example.ts`, with a URL the app chose, and return only the API's data. Never import `lib/passflow` from a `'use client'` file.
38
+ - **Checked:** `verify.sh static` fails on storage calls near the word "token", and on a `'use client'` file that imports `lib/passflow` or `@passflow/nextjs`.
39
+
40
+ ## 6. Verify tokens, never decode them by hand
41
+
42
+ - **Rule:** no `jwt-decode`, `jsonwebtoken`, `atob(...)` or base64 `Buffer.from` on a token.
43
+ - **Why:** decoding is not verifying. A hand-decoded token has no signature, issuer, audience or expiry check.
44
+ - **Instead:** read the user from `session.user`. The app never reads claims from the access token: it sends the token to an API (`assets/lib/call-api.example.ts`), and the API verifies it. A Node.js API does that with the Passflow Node API skill.
45
+ - **Checked:** `verify.sh static` (guardrails).
46
+
47
+ ## 7. SameSite cookies plus an Origin check on changes
48
+
49
+ - **Rule:** a route handler that changes data starts with `if (!passflow.isSameOrigin(request))` and answers 403.
50
+ - **Why:** the session cookie (`__Host-passflow_session` on https, `passflow_session` on http localhost) is `SameSite=Lax`, which still lets a same-site page on another origin send it. Server actions have Next.js's own Origin check; route handlers do not.
51
+ - **Instead:** copy the `POST` handler of `assets/app/api/me/route.ts`. Do not loosen the cookie or add CORS for the app's own routes.
52
+ - **Checked:** `verify.sh run` sends a `POST` from `https://evil.example` and expects 403, and from the app's own origin and expects 401.
53
+
54
+ ## 8. Copy SDK calls from `assets/`, never from memory
55
+
56
+ - **Rule:** every `@passflow/nextjs` import and call in the app matches an asset file.
57
+ - **Why:** the package has a small, exact surface. A remembered name or option from another auth library compiles badly or, worse, compiles and checks nothing.
58
+ - **Instead:** copy the asset, then adapt only what `SKILL.md` allows: the target root, the page to protect, and, when the project has no `@/*` path, the import specifiers (relative paths instead of `@/`). Never the calls.
59
+ - **Checked:** `verify.sh static` type-checks and builds the app, and checks that `proxy.ts` calls `passflow.proxy`.
60
+
61
+ ## 9. Sign-in and sign-out links are plain `<a href>`
62
+
63
+ - **Rule:** links to `/auth/login` and `/auth/logout` are `<a href>`, never `next/link`.
64
+ - **Why:** both routes act on GET, and `next/link` prefetches. `/auth/logout` ignores a prefetch and a request another site starts, so a prefetch never signs the user out, but a prefetch of `/auth/login` can still start a sign-in before anyone clicks. The client router also cannot render a route the proxy serves. A plain `<a href>` keeps sign-in and sign-out working.
65
+ - **Instead:** render `<AuthLinks />` from `assets/components/auth-links.tsx` inside `<Suspense>`, in a server component. Pass `returnTo` to come back to a page after sign-in: `<AuthLinks returnTo="/account" />`. A client component that needs a link writes a plain `<a href="/auth/login?returnTo=…">` or `<a href="/auth/logout">` itself.
66
+ - **Checked:** `verify.sh static` fails on a `<Link` whose `href` starts with `/auth/`.
67
+
68
+ ## 10. Never write an env file, `package.json` scripts or another dependency
69
+
70
+ - **Rule:** never create or edit any `.env*` file: `.env`, `.env.local` and `.env.example` alike. In `package.json`, only add `@passflow/nextjs`; never edit `scripts` and never add another dependency.
71
+ - **Why:** the env file holds the developer's secrets. `npx passflow integrate` writes `.env.local` and `.env.example` on the developer's machine, and the Passflow service writes `.env.example` in a GitHub App run, with the public values filled in and the secrets empty. The service refuses a change to any `.env*` file, to `scripts`, or to a dependency other than `@passflow/*`.
72
+ - **Instead:** the last message to the developer lists what they do: `cp .env.example .env.local` and fill in the values, any name `.env.example` lacks, and any script or dependency the app would need.
73
+ - **Checked:** no.
74
+
75
+ ## 11. The env file stays out of git
76
+
77
+ - **Rule:** `.env.local` is never committed. On the developer's machine, if `git ls-files --error-unmatch .env.local` succeeds, stop and tell the user. A Passflow GitHub App run never starts on such a repository: the service refuses a committed `.env`, `.env.local` or `.env.*.local` before the agent runs.
78
+ - **Why:** a `.gitignore` line does not cover a file git already tracks.
79
+ - **Instead:** tell the user to run `git rm --cached .env.local`, commit, and add `.env.local` to `.gitignore`.
80
+ - **Checked:** no.
81
+
82
+ ## 12. In an existing proxy or middleware, Passflow handles the sign-in routes first
83
+
84
+ - **Rule:** when the project already has `proxy.ts` or `middleware.ts`, its function sends `/auth/login`, `/auth/callback` and `/auth/logout` to `passflow.proxy(request)` before any of its own redirects or rewrites, and returns Passflow's response unchanged where it would return `NextResponse.next()`.
85
+ - **Why:** a locale redirect or a "signed in?" redirect that runs first catches `/auth/callback`, so the user signs in on the Passflow page and comes back without a session. A new `NextResponse.next()` built after Passflow's response drops the refreshed session cookie and the request headers Passflow forwards to the page.
86
+ - **Instead:** follow step 5 of `SKILL.md`. Look for `proxy` and `middleware` files, `.ts` or `.js`, in the project root and in `src/` before adding one. Keep the existing file's name, extension and other branches; never add a second file.
87
+ - **Checked:** partly. `verify.sh static` checks that the file calls `passflow.proxy` and that only one proxy or middleware file exists beside `app/`; `verify.sh run` checks that `/auth/login` reaches the issuer. The order of the branches is not checked.
@@ -0,0 +1,405 @@
1
+ {
2
+ "schema": 1,
3
+ "package_managers": {
4
+ "supported": [
5
+ "npm",
6
+ "pnpm",
7
+ "yarn-classic"
8
+ ],
9
+ "refused": [
10
+ "yarn-berry",
11
+ "bun"
12
+ ],
13
+ "detect": [
14
+ {
15
+ "file": "pnpm-lock.yaml",
16
+ "manager": "pnpm"
17
+ },
18
+ {
19
+ "file": "package-lock.json",
20
+ "manager": "npm"
21
+ },
22
+ {
23
+ "file": "yarn.lock",
24
+ "manager": "yarn-classic"
25
+ },
26
+ {
27
+ "file": ".yarnrc.yml",
28
+ "manager": "yarn-berry"
29
+ },
30
+ {
31
+ "file": "bun.lock",
32
+ "manager": "bun"
33
+ },
34
+ {
35
+ "file": "bun.lockb",
36
+ "manager": "bun"
37
+ }
38
+ ]
39
+ },
40
+ "stacks": [
41
+ {
42
+ "id": "tanstack-start",
43
+ "skill": "passflow-tanstack-start",
44
+ "detect": {
45
+ "all": [
46
+ {
47
+ "package": "@tanstack/react-start",
48
+ "range": ">=1.169.5"
49
+ },
50
+ {
51
+ "package": "@tanstack/react-router",
52
+ "range": ">=1.170.46"
53
+ }
54
+ ]
55
+ },
56
+ "app_type": "bff",
57
+ "default_base_url": "http://localhost:3000",
58
+ "env_file": ".env.local",
59
+ "env_keys": [
60
+ "PASSFLOW_ISSUER",
61
+ "PASSFLOW_CLIENT_ID",
62
+ "PASSFLOW_CLIENT_SECRET",
63
+ "PASSFLOW_SECRET",
64
+ "APP_BASE_URL"
65
+ ],
66
+ "secret_env_keys": [
67
+ "PASSFLOW_CLIENT_SECRET",
68
+ "PASSFLOW_SECRET"
69
+ ],
70
+ "not_provisioned_env_keys": [],
71
+ "packages": [
72
+ {
73
+ "name": "@passflow/tanstack-react-start",
74
+ "version_env": "PASSFLOW_TANSTACK_REACT_START_VERSION",
75
+ "env_keys": [
76
+ "PASSFLOW_ISSUER",
77
+ "PASSFLOW_CLIENT_ID",
78
+ "PASSFLOW_CLIENT_SECRET",
79
+ "PASSFLOW_SECRET",
80
+ "APP_BASE_URL"
81
+ ]
82
+ }
83
+ ],
84
+ "allowed_paths": [
85
+ "src/**",
86
+ "app/**",
87
+ ".gitignore",
88
+ "package.json",
89
+ "package-lock.json",
90
+ "pnpm-lock.yaml",
91
+ "yarn.lock"
92
+ ],
93
+ "denied_paths": [
94
+ "next.config.*",
95
+ "vite.config.*",
96
+ "vitest.config.*",
97
+ "app.config.*",
98
+ "tsconfig*.json",
99
+ "jsconfig*.json",
100
+ "postcss.config.*",
101
+ "tailwind.config.*",
102
+ "eslint.config.*",
103
+ ".eslintrc*",
104
+ "babel.config.*",
105
+ ".babelrc*",
106
+ "turbo.json",
107
+ "nx.json",
108
+ "Dockerfile*",
109
+ "docker-compose*",
110
+ ".github/**",
111
+ ".env*",
112
+ "**/.env*",
113
+ "scripts/**",
114
+ ".npmrc",
115
+ "**/.npmrc",
116
+ ".yarnrc",
117
+ ".yarnrc.yml",
118
+ ".yarn/**",
119
+ ".pnp.cjs",
120
+ ".pnp.loader.mjs",
121
+ "pnpm-workspace.yaml",
122
+ "npm-shrinkwrap.json",
123
+ "bun.lock",
124
+ "bun.lockb"
125
+ ]
126
+ },
127
+ {
128
+ "id": "nextjs",
129
+ "skill": "passflow-nextjs",
130
+ "detect": {
131
+ "all": [
132
+ {
133
+ "package": "next",
134
+ "range": ">=16"
135
+ }
136
+ ]
137
+ },
138
+ "app_type": "bff",
139
+ "default_base_url": "http://localhost:3000",
140
+ "env_file": ".env.local",
141
+ "env_keys": [
142
+ "PASSFLOW_ISSUER",
143
+ "PASSFLOW_CLIENT_ID",
144
+ "PASSFLOW_CLIENT_SECRET",
145
+ "PASSFLOW_SECRET",
146
+ "APP_BASE_URL"
147
+ ],
148
+ "secret_env_keys": [
149
+ "PASSFLOW_CLIENT_SECRET",
150
+ "PASSFLOW_SECRET"
151
+ ],
152
+ "not_provisioned_env_keys": [],
153
+ "packages": [
154
+ {
155
+ "name": "@passflow/nextjs",
156
+ "version_env": "PASSFLOW_NEXTJS_VERSION",
157
+ "env_keys": [
158
+ "PASSFLOW_ISSUER",
159
+ "PASSFLOW_CLIENT_ID",
160
+ "PASSFLOW_CLIENT_SECRET",
161
+ "PASSFLOW_SECRET",
162
+ "APP_BASE_URL"
163
+ ]
164
+ }
165
+ ],
166
+ "allowed_paths": [
167
+ "app/**",
168
+ "src/**",
169
+ "lib/**",
170
+ "components/**",
171
+ "proxy.ts",
172
+ "proxy.js",
173
+ "middleware.ts",
174
+ "middleware.js",
175
+ "src/proxy.ts",
176
+ "src/proxy.js",
177
+ "src/middleware.ts",
178
+ "src/middleware.js",
179
+ ".gitignore",
180
+ "package.json",
181
+ "package-lock.json",
182
+ "pnpm-lock.yaml",
183
+ "yarn.lock"
184
+ ],
185
+ "denied_paths": [
186
+ "next.config.*",
187
+ "vite.config.*",
188
+ "vitest.config.*",
189
+ "app.config.*",
190
+ "tsconfig*.json",
191
+ "jsconfig*.json",
192
+ "postcss.config.*",
193
+ "tailwind.config.*",
194
+ "eslint.config.*",
195
+ ".eslintrc*",
196
+ "babel.config.*",
197
+ ".babelrc*",
198
+ "turbo.json",
199
+ "nx.json",
200
+ "Dockerfile*",
201
+ "docker-compose*",
202
+ ".github/**",
203
+ ".env*",
204
+ "**/.env*",
205
+ "scripts/**",
206
+ ".npmrc",
207
+ "**/.npmrc",
208
+ ".yarnrc",
209
+ ".yarnrc.yml",
210
+ ".yarn/**",
211
+ ".pnp.cjs",
212
+ ".pnp.loader.mjs",
213
+ "pnpm-workspace.yaml",
214
+ "npm-shrinkwrap.json",
215
+ "bun.lock",
216
+ "bun.lockb"
217
+ ]
218
+ },
219
+ {
220
+ "id": "react-vite",
221
+ "skill": "passflow-react-vite",
222
+ "detect": {
223
+ "all": [
224
+ {
225
+ "package": "vite"
226
+ },
227
+ {
228
+ "package": "react"
229
+ }
230
+ ]
231
+ },
232
+ "app_type": "spa",
233
+ "default_base_url": "http://localhost:5173",
234
+ "env_file": ".env.local",
235
+ "env_keys": [
236
+ "VITE_PASSFLOW_URL",
237
+ "VITE_PASSFLOW_APP_ID",
238
+ "VITE_API_URL",
239
+ "PASSFLOW_ISSUER",
240
+ "PASSFLOW_AUDIENCE",
241
+ "APP_BASE_URL"
242
+ ],
243
+ "secret_env_keys": [],
244
+ "not_provisioned_env_keys": [
245
+ "VITE_API_URL"
246
+ ],
247
+ "packages": [
248
+ {
249
+ "name": "@passflow/react",
250
+ "version_env": "PASSFLOW_REACT_VERSION",
251
+ "env_keys": [
252
+ "VITE_PASSFLOW_URL",
253
+ "VITE_PASSFLOW_APP_ID",
254
+ "VITE_API_URL"
255
+ ]
256
+ },
257
+ {
258
+ "name": "@passflow/node",
259
+ "version_env": "PASSFLOW_NODE_VERSION",
260
+ "env_keys": [
261
+ "PASSFLOW_ISSUER",
262
+ "PASSFLOW_AUDIENCE",
263
+ "APP_BASE_URL"
264
+ ]
265
+ }
266
+ ],
267
+ "allowed_paths": [
268
+ "src/**",
269
+ "server/**",
270
+ "api/**",
271
+ ".gitignore",
272
+ "package.json",
273
+ "package-lock.json",
274
+ "pnpm-lock.yaml",
275
+ "yarn.lock"
276
+ ],
277
+ "denied_paths": [
278
+ "next.config.*",
279
+ "vite.config.*",
280
+ "vitest.config.*",
281
+ "app.config.*",
282
+ "tsconfig*.json",
283
+ "jsconfig*.json",
284
+ "postcss.config.*",
285
+ "tailwind.config.*",
286
+ "eslint.config.*",
287
+ ".eslintrc*",
288
+ "babel.config.*",
289
+ ".babelrc*",
290
+ "turbo.json",
291
+ "nx.json",
292
+ "Dockerfile*",
293
+ "docker-compose*",
294
+ ".github/**",
295
+ ".env*",
296
+ "**/.env*",
297
+ "scripts/**",
298
+ ".npmrc",
299
+ "**/.npmrc",
300
+ ".yarnrc",
301
+ ".yarnrc.yml",
302
+ ".yarn/**",
303
+ ".pnp.cjs",
304
+ ".pnp.loader.mjs",
305
+ "pnpm-workspace.yaml",
306
+ "npm-shrinkwrap.json",
307
+ "bun.lock",
308
+ "bun.lockb",
309
+ "index.html"
310
+ ]
311
+ },
312
+ {
313
+ "id": "node-api",
314
+ "skill": "passflow-node-api",
315
+ "detect": {
316
+ "any": [
317
+ {
318
+ "package": "express"
319
+ },
320
+ {
321
+ "package": "fastify"
322
+ },
323
+ {
324
+ "package": "hono"
325
+ }
326
+ ]
327
+ },
328
+ "app_type": null,
329
+ "default_base_url": null,
330
+ "env_file": ".env",
331
+ "env_keys": [
332
+ "PASSFLOW_ISSUER",
333
+ "PASSFLOW_AUDIENCE"
334
+ ],
335
+ "secret_env_keys": [],
336
+ "not_provisioned_env_keys": [],
337
+ "packages": [
338
+ {
339
+ "name": "@passflow/node",
340
+ "version_env": "PASSFLOW_NODE_VERSION",
341
+ "env_keys": [
342
+ "PASSFLOW_ISSUER",
343
+ "PASSFLOW_AUDIENCE"
344
+ ]
345
+ }
346
+ ],
347
+ "allowed_paths": [
348
+ "src/**",
349
+ "server/**",
350
+ "lib/**",
351
+ "routes/**",
352
+ "index.ts",
353
+ "index.js",
354
+ "index.mjs",
355
+ "server.ts",
356
+ "server.js",
357
+ "server.mjs",
358
+ "app.ts",
359
+ "app.js",
360
+ "app.mjs",
361
+ "main.ts",
362
+ "main.js",
363
+ "main.mjs",
364
+ ".gitignore",
365
+ "package.json",
366
+ "package-lock.json",
367
+ "pnpm-lock.yaml",
368
+ "yarn.lock"
369
+ ],
370
+ "denied_paths": [
371
+ "next.config.*",
372
+ "vite.config.*",
373
+ "vitest.config.*",
374
+ "app.config.*",
375
+ "tsconfig*.json",
376
+ "jsconfig*.json",
377
+ "postcss.config.*",
378
+ "tailwind.config.*",
379
+ "eslint.config.*",
380
+ ".eslintrc*",
381
+ "babel.config.*",
382
+ ".babelrc*",
383
+ "turbo.json",
384
+ "nx.json",
385
+ "Dockerfile*",
386
+ "docker-compose*",
387
+ ".github/**",
388
+ ".env*",
389
+ "**/.env*",
390
+ "scripts/**",
391
+ ".npmrc",
392
+ "**/.npmrc",
393
+ ".yarnrc",
394
+ ".yarnrc.yml",
395
+ ".yarn/**",
396
+ ".pnp.cjs",
397
+ ".pnp.loader.mjs",
398
+ "pnpm-workspace.yaml",
399
+ "npm-shrinkwrap.json",
400
+ "bun.lock",
401
+ "bun.lockb"
402
+ ]
403
+ }
404
+ ]
405
+ }