@absolutejs/auth 0.86.0 → 0.86.1

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/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ This file is generated by `absolute-changelog` from the entries in
6
6
  `changelog/`. Edit an entry, not this file — and add new ones under
7
7
  `changelog/unreleased/`.
8
8
 
9
+ ## 0.86.1 — 2026-09-23
10
+
11
+ ### Fixed
12
+
13
+ - **Allow authorized nonmember organization managers to list memberships. Revoke invitations when their delivery hook fails and return a sanitized retryable error.** (`organizationRoutes`, `createAuthApplications`)
14
+
9
15
  ## 0.86.0 — 2026-09-23
10
16
 
11
17
  ### Breaking
package/changelog.json CHANGED
@@ -2,6 +2,20 @@
2
2
  "contract": 1,
3
3
  "name": "@absolutejs/auth",
4
4
  "releases": [
5
+ {
6
+ "changes": [
7
+ {
8
+ "kind": "fixed",
9
+ "summary": "Allow authorized nonmember organization managers to list memberships. Revoke invitations when their delivery hook fails and return a sanitized retryable error.",
10
+ "symbols": [
11
+ "organizationRoutes",
12
+ "createAuthApplications"
13
+ ]
14
+ }
15
+ ],
16
+ "date": "2026-09-23",
17
+ "version": "0.86.1"
18
+ },
5
19
  {
6
20
  "changes": [
7
21
  {
package/dist/index.d.ts CHANGED
@@ -3045,6 +3045,7 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
3045
3045
  property?: string;
3046
3046
  expected?: string;
3047
3047
  };
3048
+ 502: "Invitation delivery failed; create a new invitation to retry";
3048
3049
  };
3049
3050
  error: never;
3050
3051
  };
package/dist/index.js CHANGED
@@ -10431,13 +10431,21 @@ var organizationRoutes = ({
10431
10431
  organizationStore,
10432
10432
  roles: roles ?? []
10433
10433
  });
10434
- await onSendInvitation?.({
10435
- email: invitation.email,
10436
- expiresAt: invitation.expiresAt,
10437
- inviterUserId: invitation.inviterUserId,
10438
- organizationId,
10439
- token
10440
- });
10434
+ try {
10435
+ await onSendInvitation?.({
10436
+ email: invitation.email,
10437
+ expiresAt: invitation.expiresAt,
10438
+ inviterUserId: invitation.inviterUserId,
10439
+ organizationId,
10440
+ token
10441
+ });
10442
+ } catch {
10443
+ await organizationStore.saveInvitation({
10444
+ ...invitation,
10445
+ state: "revoked"
10446
+ });
10447
+ return status("Bad Gateway", "Invitation delivery failed; create a new invitation to retry");
10448
+ }
10441
10449
  await emit?.({
10442
10450
  at: Date.now(),
10443
10451
  metadata: { email: invitation.email },
@@ -10545,7 +10553,7 @@ var organizationRoutes = ({
10545
10553
  return status("Unauthorized", "Authentication required");
10546
10554
  }
10547
10555
  const membership = await organizationStore.getMembership(organizationId, getUserId(user));
10548
- if (membership?.status !== "active") {
10556
+ if (membership?.status !== "active" && !await mayManage(user, organizationId)) {
10549
10557
  return status("Forbidden", "Not a member");
10550
10558
  }
10551
10559
  const members = await organizationStore.listMembershipsByOrganization(organizationId);
@@ -41608,5 +41616,5 @@ export {
41608
41616
  writeWarrant
41609
41617
  };
41610
41618
 
41611
- //# debugId=466F05C3ADFAC39864756E2164756E21
41619
+ //# debugId=DC508F314D7A052E64756E2164756E21
41612
41620
  //# sourceMappingURL=index.js.map