ReviewOS

also looking at this

stacks/uplink

feat(billing): issue the license from Stripe, not only from the thank-you page

#49
Merged glennmichael123 wants to merge feat/stripe-webhook into main
9 files +439 -2
routes/api.tsmodified+4-0
Changes to routes/api.ts
@@ -27,6 +27,10 @@ route.get('/hello', () => response.text('hello world'))
2727// there is nothing for a CSRF token to protect, and the app has none to send.
2828route.post('/license/check', 'Actions/License/CheckLicenseAction').skipCsrf()
2929route.post('/billing/portal', 'Actions/Billing/OpenPortalAction').skipCsrf()
30// Stripe's own copy of a completed checkout. It carries a signature rather
31// than a session cookie, so it skips CSRF like the two above, and it is the
32// reason a buyer who never loads /thanks still gets a key.
33route.post('/billing/webhook', 'Actions/Billing/StripeWebhookAction').skipCsrf()
3034
3135// `/coming-soon` is served as an STX view from
3236// `storage/framework/defaults/resources/views/coming-soon.stx`. The