Repository navigation
Commit 06fee1b
authored
fix(billing): register the Stripe plugin only when the webhook secret is configured (#9363)
Stripe's verifier accepts signatures computed with an empty key, so the Better Auth Stripe plugin now registers only when billing is on and both STRIPE_SECRET_KEY and a non-blank STRIPE_WEBHOOK_SECRET are set, logging an error otherwise. The sim-setup preflight requires the webhook secret alongside the secret key.1 parent 3fc79a2 commit 06fee1b
2 files changed
Lines changed: 25 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 | + | |
| 257 | + | |
247 | 258 | | |
248 | 259 | | |
| 260 | + | |
| 261 | + | |
249 | 262 | | |
250 | 263 | | |
251 | 264 | | |
| |||
967 | 980 | | |
968 | 981 | | |
969 | 982 | | |
970 | | - | |
| 983 | + | |
971 | 984 | | |
972 | 985 | | |
973 | 986 | | |
| |||
1547 | 1560 | | |
1548 | 1561 | | |
1549 | 1562 | | |
1550 | | - | |
| 1563 | + | |
1551 | 1564 | | |
1552 | 1565 | | |
1553 | | - | |
1554 | | - | |
| 1566 | + | |
| 1567 | + | |
1555 | 1568 | | |
1556 | 1569 | | |
1557 | 1570 | | |
| |||
| 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