[GH-ISSUE #7988] Event fan out and event bus #10964

Closed
opened 2026-04-13 07:21:16 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @joeblew999 on GitHub (Feb 16, 2026).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/7988

Is this suited for github?

  • Yes, this is suited for github

Is your feature request related to a problem? Please describe.

an outbound webhooks/events plugin seems like a natural ask given how many people need to fan auth events out to other systems.​​​​​​​​​​​​​​​​

Describe the solution you'd like

For example the QR based login .

You would want to tell some other system of the event .

Using the database with simple polling is a decent way to do it with retry . It’s not efficient but keeps all the logic in one system . For example I do this on Cloudflare D1 and the polling is cheap even on D1 .

Describe alternatives you've considered

None

Additional context

No response

Originally created by @joeblew999 on GitHub (Feb 16, 2026). Original GitHub issue: https://github.com/better-auth/better-auth/issues/7988 ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. an outbound webhooks/events plugin seems like a natural ask given how many people need to fan auth events out to other systems.​​​​​​​​​​​​​​​​ ### Describe the solution you'd like For example the QR based login . You would want to tell some other system of the event . Using the database with simple polling is a decent way to do it with retry . It’s not efficient but keeps all the logic in one system . For example I do this on Cloudflare D1 and the polling is cheap even on D1 . ### Describe alternatives you've considered None ### Additional context _No response_
GiteaMirror added the enhancementlocked labels 2026-04-13 07:21:16 -05:00
Author
Owner

@joeblew999 commented on GitHub (Feb 16, 2026):

Zod-validated payloads, registered endpoints, HMAC signing, retry logic. Seems like something the project would benefit from given how many people run Better Auth alongside other systems.​​​​​​​​​​​​​​​​

<!-- gh-comment-id:3905932791 --> @joeblew999 commented on GitHub (Feb 16, 2026): Zod-validated payloads, registered endpoints, HMAC signing, retry logic. Seems like something the project would benefit from given how many people run Better Auth alongside other systems.​​​​​​​​​​​​​​​​
Author
Owner

@joeblew999 commented on GitHub (Feb 16, 2026):

Meanwhile the core has hooks.after and databaseHooks as low-level primitives, but no unified event system that all plugins emit into.
What’s missing is a single event bus at the core level:
∙ Every plugin (device auth, session, org, admin, stripe, etc.) emits standardized events into it
∙ One place to subscribe — whether you want to push webhooks, write to a queue, log to D1, whatever
∙ One Zod schema per event type, consistent across the whole system
∙ Consumers don’t need to know which plugin generated the event
Instead, today you’d have to wire up hooks.after with path matching, plus databaseHooks, plus each payment plugin’s custom callback — all separately. That’s the fragmentation.

<!-- gh-comment-id:3905938555 --> @joeblew999 commented on GitHub (Feb 16, 2026): Meanwhile the core has hooks.after and databaseHooks as low-level primitives, but no unified event system that all plugins emit into. What’s missing is a single event bus at the core level: ∙ Every plugin (device auth, session, org, admin, stripe, etc.) emits standardized events into it ∙ One place to subscribe — whether you want to push webhooks, write to a queue, log to D1, whatever ∙ One Zod schema per event type, consistent across the whole system ∙ Consumers don’t need to know which plugin generated the event Instead, today you’d have to wire up hooks.after with path matching, plus databaseHooks, plus each payment plugin’s custom callback — all separately. That’s the fragmentation.
Author
Owner

@himself65 commented on GitHub (Feb 16, 2026):

We don't have the plan to add the event system

<!-- gh-comment-id:3907878517 --> @himself65 commented on GitHub (Feb 16, 2026): We don't have the plan to add the event system
Author
Owner

@joeblew999 commented on GitHub (Feb 17, 2026):

Ok will do it myself on fork

<!-- gh-comment-id:3912064490 --> @joeblew999 commented on GitHub (Feb 17, 2026): Ok will do it myself on fork
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#10964