feat(auth): signUp publishes userSignedUpEvent
signUpUseCase now takes an IEventBus and publishes userSignedUpEvent after creating the user (synthesizing email from username since auth is username-based). Use case mocks-default in module.ts get a fresh InMemoryEventBus per resolution; bind-production / bind-dev-seed wire the shared bus passed by bindAll. Tests updated to inject RecordingEventBus, including a new test that asserts publish on success and silence on failure.
This commit is contained in:
@@ -81,7 +81,7 @@ export async function bindDevSeedAuth(
|
||||
withCapture(
|
||||
logger,
|
||||
{ feature: "auth", layer: "use-case", name: "auth.signUp" },
|
||||
signUpUseCase(repo, authService),
|
||||
signUpUseCase(repo, authService, bus),
|
||||
),
|
||||
);
|
||||
const wrappedSignOut = withSpan(
|
||||
|
||||
Reference in New Issue
Block a user