Skip to content

Commit 2e86f80

Browse files
committed
update fdx
1 parent be48ca2 commit 2e86f80

File tree

10 files changed

+39
-24
lines changed

10 files changed

+39
-24
lines changed

CLAUDE.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ pnpm --filter @apps/app start # Start APP in production
5454
### Caddy Configuration
5555

5656
The current `caddyfile` configuration routes traffic as follows:
57+
5758
- `id.localtest.me``localhost:3001` (OP)
5859
- `app.localtest.me``localhost:3004` (Client App)
5960
- `api.localtest.me``localhost:3003` (Resource Server)
@@ -113,7 +114,7 @@ Key features:
113114
- Includes customer and account data repositories
114115
- Uses Pino for structured logging
115116
- Runs on port 3003
116-
- Implements FDX Core Exchange API specification (v6.3.1)
117+
- Implements FDX with Plaid's Core Exchange API specification (v6.3.1)
117118

118119
Key components:
119120

@@ -124,7 +125,7 @@ Key components:
124125
- Request validation utilities
125126
- Public health endpoint
126127

127-
Available endpoints (FDX Core Exchange compliant):
128+
Available endpoints (FDX compliant):
128129

129130
- `/api/fdx/v6/customers/current` - Get current customer information
130131
- `/api/fdx/v6/accounts` - List customer accounts
@@ -189,6 +190,7 @@ The authorization server supports multiple client configurations:
189190
3. **Environment variable**: Set `OIDC_CLIENTS` as a JSON string
190191

191192
Each client configuration must include:
193+
192194
- `client_id`: Unique client identifier
193195
- `client_secret`: Client secret for authentication
194196
- `redirect_uris`: Array of allowed redirect URIs
@@ -200,6 +202,7 @@ Each client configuration must include:
200202
### Scopes
201203

202204
Supported scopes:
205+
203206
- `openid` - Basic identity (required)
204207
- `profile` - Profile information (name)
205208
- `email` - Email address
@@ -209,6 +212,7 @@ Supported scopes:
209212
### Token TTLs
210213

211214
Default token lifetimes (configured in `apps/auth/src/index.ts`):
215+
212216
- Session: 1 day (86400 seconds)
213217
- Grant: 1 year (31536000 seconds)
214218
- Access Token: 1 hour (3600 seconds)
@@ -220,13 +224,15 @@ Default token lifetimes (configured in `apps/auth/src/index.ts`):
220224
The authorization server uses JWKS (JSON Web Key Set) to sign JWT tokens:
221225

222226
**Development (default):**
227+
223228
- No `JWKS` environment variable needed
224229
- `oidc-provider` auto-generates ephemeral keys on startup
225230
- Keys have `kid="keystore-CHANGE-ME"` in JWT headers
226231
- Keys regenerate on each restart (invalidates all tokens)
227232
- Perfectly acceptable for local development
228233

229234
**Production (required):**
235+
230236
- Set `JWKS` environment variable with persistent signing keys
231237
- Prevents token invalidation on server restarts
232238
- Enables proper key rotation strategy
@@ -235,6 +241,7 @@ The authorization server uses JWKS (JSON Web Key Set) to sign JWT tokens:
235241
- Contains private key material - never commit to version control
236242

237243
**Why persistent keys matter:**
244+
238245
- Tokens survive service restarts and deployments
239246
- Multiple server instances can share the same keys
240247
- Proper cryptographic key rotation
@@ -249,7 +256,7 @@ The authorization server uses JWKS (JSON Web Key Set) to sign JWT tokens:
249256
3. Use demo credentials: `[email protected]` / `passw0rd!`
250257
4. Approve consent (you'll see all requested scopes: openid, email, profile, offline_access, accounts:read)
251258
5. After redirect, explore the features:
252-
- **API Explorer** (`/api-explorer`): Test all FDX Core Exchange endpoints interactively
259+
- **API Explorer** (`/api-explorer`): Test all FDX endpoints interactively
253260
- **Token Inspector** (`/token`): View your ID token claims and user information
254261
- **Token Debug** (`/debug/tokens`): Inspect raw and decoded access/ID/refresh tokens
255262

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
# Core Exchange Sample Implementation
1+
# Build FDX APIs using Plaid
2+
3+
## Core Exchange Sample Implementation with Node.js
24

35
<p align="center">
46
<img src="apps/app/public/plaidypus-200.png" alt="Plaidypus Logo" width="200">
57
</p>
68

7-
A working example of [Plaid Core Exchange](https://plaid.com/core-exchange/docs/) with OpenID Connect and FDX Core Exchange API v6.3. We built this with TypeScript, Express, and battle-tested OAuth libraries so you can see how all the pieces fit together.
9+
A working example of [Plaid Core Exchange](https://plaid.com/core-exchange/docs/) with OpenID Connect and FDX API v6.3. We built this with TypeScript, Express, and battle-tested OAuth libraries so you can see how all the pieces fit together.
810

911
## What's Inside
1012

@@ -50,7 +52,7 @@ The OpenID Provider. This is where users log in and grant permissions. We're usi
5052

5153
### Resource Server (`apps/api`)
5254

53-
The protected API implementing FDX Core Exchange API v6.3. Every request gets validated—we check JWT access tokens using `jose` against the Auth server's JWKS endpoint and enforce scope-based authorization. Customer and account data live here, accessed via a repository pattern.
55+
The protected API implementing FDX v6.3 using Plaid's Core Exchange. Every request gets validated—we check JWT access tokens using `jose` against the Auth server's JWKS endpoint and enforce scope-based authorization. Customer and account data live here, accessed via a repository pattern.
5456

5557
**Endpoints you get:** Customer info, account details, statements, transactions, contact info, payment and asset transfer network data
5658

@@ -205,7 +207,7 @@ Once everything's running, here's the fun part:
205207

206208
### Resource Server (API)
207209

208-
All the FDX Core Exchange API v6.3 endpoints you need:
210+
All the FDX v6.3 endpoints you need for Plaid Core Exchange:
209211

210212
- **Customer**: `/api/fdx/v6/customers/current`
211213
- **Accounts**: `/api/fdx/v6/accounts`, `/api/fdx/v6/accounts/{accountId}`

apps/app/public/styles.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */
1+
/*! tailwindcss v4.1.15 | MIT License | https://tailwindcss.com */
22
@layer properties;
33
@layer theme, base, components, utilities;
44
@layer theme {
@@ -169,7 +169,9 @@
169169
::placeholder {
170170
color: currentcolor;
171171
@supports (color: color-mix(in lab, red, red)) {
172-
color: color-mix(in oklab, currentcolor 50%, transparent);
172+
& {
173+
color: color-mix(in oklab, currentcolor 50%, transparent);
174+
}
173175
}
174176
}
175177
}

apps/app/views/api-explorer.ejs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>API Explorer - Plaidypus Client</title>
7+
<title>API Explorer - Plaidypus FDX Explorer</title>
88
<link rel="icon" type="image/png" href="/public/plaidypus-200.png">
99
<link href="/public/styles.css" rel="stylesheet">
1010
<style>
@@ -239,7 +239,9 @@
239239
<h3 class="text-md font-medium text-plaid-dark-gray">Response</h3>
240240
<button onclick="copyToClipboard('response-content', this)" class="copy-button" style="float: none;">
241241
<svg class="w-4 h-4 inline-block mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
242-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path>
242+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
243+
d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z">
244+
</path>
243245
</svg>
244246
Copy
245247
</button>

apps/app/views/debug-tokens.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>Token Debug - Plaidypus Client</title>
7+
<title>Token Debug - Plaidypus FDX Explorer</title>
88
<link rel="icon" type="image/png" href="/public/plaidypus-200.png">
99
<link href="/public/styles.css" rel="stylesheet">
1010
</head>

apps/app/views/index.ejs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>Home - Plaidypus Client</title>
7+
<title>Home - Plaidypus FDX Explorer</title>
88
<link rel="icon" type="image/png" href="/public/plaidypus-200.png">
99
<link href="/public/styles.css" rel="stylesheet">
1010
</head>
@@ -17,8 +17,8 @@
1717
<div class="flex items-center space-x-4">
1818
<img src="/public/plaidypus-200.png" alt="Plaidypus Logo" class="h-16 w-16">
1919
<div>
20-
<h1 class="text-3xl font-bold text-plaid-black">Core Exchange API Playground</h1>
21-
<p class="text-plaid-dark-gray mt-2">Time to check out Core Exchange in action!</p>
20+
<h1 class="text-3xl font-bold text-plaid-black">Build FDX APIs using Plaid</h1>
21+
<p class="text-plaid-dark-gray mt-2">See FDX APIs in action using Plaid Core Exchange!</p>
2222
</div>
2323
</div>
2424
</div>
@@ -28,10 +28,10 @@
2828
<h2 class="text-lg font-semibold text-plaid-black mb-4">What's Under the Hood</h2>
2929
<div class="prose prose-sm max-w-none text-plaid-dark-gray">
3030
<p class="mb-3">
31-
A full-stack reference implementation of <a href="https://plaid.com/core-exchange/docs/reference/6.3"
32-
target="_blank" rel="noopener noreferrer"
31+
A full-stack reference implementation of FDX v6.3 using Plaid <a
32+
href="https://plaid.com/core-exchange/docs/reference/6.3" target="_blank" rel="noopener noreferrer"
3333
class="text-plaid-mint-600 hover:text-plaid-mint-700 underline hover:no-underline">Core
34-
Exchange API v6.3</a> with
34+
Exchange</a> with
3535
proper OAuth 2.0 + OpenID Connect (OIDC) flows. A sample of everything you need to build a secure
3636
integration with Plaid.
3737
</p>

apps/app/views/partials/navigation.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div class="flex items-center">
66
<a href="/" class="flex items-center space-x-3 text-xl font-bold text-plaid-black hover:text-plaid-mint-600 transition-colors">
77
<img src="/public/plaidypus-200.png" alt="Plaidypus Logo" class="h-10 w-10">
8-
<span>Plaidypus Client</span>
8+
<span>Plaidypus FDX Explorer</span>
99
</a>
1010
</div>
1111

apps/app/views/token.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>Token Inspector - Plaidypus Client</title>
7+
<title>Token Inspector - Plaidypus FDX Explorer</title>
88
<link rel="icon" type="image/png" href="/public/plaidypus-200.png">
99
<link href="/public/styles.css" rel="stylesheet">
1010
<style>

apps/auth/public/styles.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! tailwindcss v4.1.14 | MIT License | https://tailwindcss.com */
1+
/*! tailwindcss v4.1.15 | MIT License | https://tailwindcss.com */
22
@layer properties;
33
@layer theme, base, components, utilities;
44
@layer theme {
@@ -149,7 +149,9 @@
149149
::placeholder {
150150
color: currentcolor;
151151
@supports (color: color-mix(in lab, red, red)) {
152-
color: color-mix(in oklab, currentcolor 50%, transparent);
152+
& {
153+
color: color-mix(in oklab, currentcolor 50%, transparent);
154+
}
153155
}
154156
}
155157
}

scripts/secrets.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/* eslint-disable no-console */
33

44
/**
5-
* Core Exchange Secrets Manager
5+
* Secrets CLI
66
*
77
* A unified CLI tool for generating secure secrets and OAuth client credentials
88
*
@@ -165,7 +165,7 @@ function generateAll( prefix = null ) {
165165
*/
166166
function showHelp() {
167167
console.log( `
168-
Core Exchange Secrets Manager
168+
Secrets CLI
169169
170170
A unified CLI tool for generating secure secrets and OAuth client credentials.
171171

0 commit comments

Comments
 (0)