Repository navigation
Commit 3940956
committed
fix(billing): register the Stripe plugin only when the webhook secret is configured
The Better Auth Stripe plugin was passed `STRIPE_WEBHOOK_SECRET || ''`. Stripe's verifier accepts signatures computed with an empty key, so the plugin's own falsy-secret check was the only thing keeping the receiver from accepting forged events. Billing now registers only when the webhook secret is set, logging an error otherwise, and the setup preflight requires it alongside STRIPE_SECRET_KEY.1 parent d4dfd17 commit 3940956
2 files changed
Lines changed: 24 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
247 | 257 | | |
248 | 258 | | |
| 259 | + | |
| 260 | + | |
249 | 261 | | |
250 | 262 | | |
251 | 263 | | |
| |||
967 | 979 | | |
968 | 980 | | |
969 | 981 | | |
970 | | - | |
| 982 | + | |
971 | 983 | | |
972 | 984 | | |
973 | 985 | | |
| |||
1547 | 1559 | | |
1548 | 1560 | | |
1549 | 1561 | | |
1550 | | - | |
| 1562 | + | |
1551 | 1563 | | |
1552 | 1564 | | |
1553 | | - | |
1554 | | - | |
| 1565 | + | |
| 1566 | + | |
1555 | 1567 | | |
1556 | 1568 | | |
1557 | 1569 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
472 | | - | |
| 472 | + | |
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| |||
0 commit comments