@fonderie/auth 7.19.1 → 7.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2795,12 +2795,14 @@ function userController(store, config, bus) {
2795
2795
  deleteMe: async (ctx) => {
2796
2796
  const userId = ctx.user.id;
2797
2797
  await users.softDelete(userId);
2798
+ await sessions.deleteByUser(userId);
2798
2799
  const reqId = ctx.meta["requestId"];
2799
2800
  await (0, import_core8.background)(bus?.emit(
2800
2801
  EVENT_KEYS.userDeleted,
2801
2802
  { userId },
2802
2803
  reqId !== void 0 ? { requestId: reqId } : void 0
2803
2804
  ));
2805
+ await (0, import_core8.background)(bus?.emit(EVENT_KEYS.sessionRevoked, { userId, sids: null, reason: "account-deleted" }));
2804
2806
  return Response.json(
2805
2807
  { reason: "ACCOUNT_DELETED", explanation: "Account successfully deleted." },
2806
2808
  {
@@ -3785,7 +3787,7 @@ var AuthModule = class {
3785
3787
  name = "@fonderie/auth";
3786
3788
  // Baked in at build time by tsup.base, so the operator's Modules page can
3787
3789
  // say what is actually deployed rather than 'not reported'.
3788
- version = "7.19.1";
3790
+ version = "7.20.0";
3789
3791
  // Users, sessions, login history, suspend — only through @fonderie/admin.
3790
3792
  describeAdmin() {
3791
3793
  return { routes: describeAuthAdminRoutes(this.store, this.bus) };