Commit 1e68a0b
authored
feat(sdk): accept optional appToken on /api/sdk/v1/install (#24)
Adds `appToken: z.string().optional()` to the install endpoint's request
schema. Self-hosted single-tenant deployments accept the field and
ignore it — no behavior change.
Cloud uses it (via an onSend hook in linkforty/cloud) to scope organic
install events to the right workspace, fixing the multi-tenant data
leak from the post-#75 regression where organic installs couldn't be
scoped to any org. Without this schema entry, Zod would strip the
field from the parsed body before Cloud's hook could read it.
The token itself is a public Stripe-style publishable key shipped in
SDK app bundles. It only identifies which org owns the install — it
cannot authenticate API actions or expose private data.
Companion to LinkForty/cloud#76 (filed alongside).1 parent 16a0470 commit 1e68a0b
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| |||
0 commit comments