[PR #7732] [MERGED] fix(organization): update path matching for active member signals #7520

Closed
opened 2026-03-13 13:40:13 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7732
Author: @LovelessCodes
Created: 1/31/2026
Status: Merged
Merged: 2/28/2026
Merged by: @Bekacru

Base: canaryHead: fix/active-member-not-updating-on-org-switch


📝 Commits (6)

  • adf1b83 fix(organization): 🐛 update path matching for active member signals
  • 645537e Merge branch 'canary' into fix/active-member-not-updating-on-org-switch
  • 47c64e9 chore(format): format 3 files using biome
  • 82f3077 chore(format): formatting 3 files with biome
  • be583ce Merge branch 'canary' into fix/active-member-not-updating-on-org-switch
  • 2531b3d Merge branch 'canary' into fix/active-member-not-updating-on-org-switch

📊 Changes

1 file changed (+18 additions, -0 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/client.ts (+18 -0)

📄 Description

  • Enhanced the path matching logic to include /organization/set-active for both $activeMemberSignal and $activeMemberRoleSignal.
  • This change ensures that the signals are triggered correctly for the active member functionality, when switching the active organization.

Summary by cubic

Fixes active member and role not updating when switching organizations by matching paths that set the active org. Signals now fire correctly on org switch.

  • Bug Fixes
    • Updated matchers to include /organization/set-active (startsWith) alongside /organization/update-member-role.
    • Triggers $activeMemberSignal and $activeMemberRoleSignal when the active org changes.

Written for commit 2531b3de43. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/7732 **Author:** [@LovelessCodes](https://github.com/LovelessCodes) **Created:** 1/31/2026 **Status:** ✅ Merged **Merged:** 2/28/2026 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/active-member-not-updating-on-org-switch` --- ### 📝 Commits (6) - [`adf1b83`](https://github.com/better-auth/better-auth/commit/adf1b837ee8764395ccbe76717b511cdfc2bbe5e) fix(organization): 🐛 update path matching for active member signals - [`645537e`](https://github.com/better-auth/better-auth/commit/645537eb3e1f42482762bb365bc89ecf3cca4085) Merge branch 'canary' into fix/active-member-not-updating-on-org-switch - [`47c64e9`](https://github.com/better-auth/better-auth/commit/47c64e9fe8ac82975a1e8843252ebf2fc7bdafb3) chore(format): format 3 files using biome - [`82f3077`](https://github.com/better-auth/better-auth/commit/82f3077cef1577faeef073a67188186e84b47748) chore(format): formatting 3 files with biome - [`be583ce`](https://github.com/better-auth/better-auth/commit/be583ce6f04d6fd3624181d92327971ddf8785cd) Merge branch 'canary' into fix/active-member-not-updating-on-org-switch - [`2531b3d`](https://github.com/better-auth/better-auth/commit/2531b3de43e519f153224bb629420a807bdead88) Merge branch 'canary' into fix/active-member-not-updating-on-org-switch ### 📊 Changes **1 file changed** (+18 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/client.ts` (+18 -0) </details> ### 📄 Description * Enhanced the path matching logic to include `/organization/set-active` for both `$activeMemberSignal` and `$activeMemberRoleSignal`. * This change ensures that the signals are triggered correctly for the active member functionality, when switching the active organization. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes active member and role not updating when switching organizations by matching paths that set the active org. Signals now fire correctly on org switch. - **Bug Fixes** - Updated matchers to include /organization/set-active (startsWith) alongside /organization/update-member-role. - Triggers $activeMemberSignal and $activeMemberRoleSignal when the active org changes. <sup>Written for commit 2531b3de43e519f153224bb629420a807bdead88. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 13:40:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#7520