@fonderie/auth 7.19.2 → 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.js CHANGED
@@ -2744,12 +2744,14 @@ function userController(store, config, bus) {
2744
2744
  deleteMe: async (ctx) => {
2745
2745
  const userId = ctx.user.id;
2746
2746
  await users.softDelete(userId);
2747
+ await sessions.deleteByUser(userId);
2747
2748
  const reqId = ctx.meta["requestId"];
2748
2749
  await background4(bus?.emit(
2749
2750
  EVENT_KEYS.userDeleted,
2750
2751
  { userId },
2751
2752
  reqId !== void 0 ? { requestId: reqId } : void 0
2752
2753
  ));
2754
+ await background4(bus?.emit(EVENT_KEYS.sessionRevoked, { userId, sids: null, reason: "account-deleted" }));
2753
2755
  return Response.json(
2754
2756
  { reason: "ACCOUNT_DELETED", explanation: "Account successfully deleted." },
2755
2757
  {
@@ -3734,7 +3736,7 @@ var AuthModule = class {
3734
3736
  name = "@fonderie/auth";
3735
3737
  // Baked in at build time by tsup.base, so the operator's Modules page can
3736
3738
  // say what is actually deployed rather than 'not reported'.
3737
- version = "7.19.2";
3739
+ version = "7.20.0";
3738
3740
  // Users, sessions, login history, suspend — only through @fonderie/admin.
3739
3741
  describeAdmin() {
3740
3742
  return { routes: describeAuthAdminRoutes(this.store, this.bus) };