[GH-ISSUE #3054] Add organizationUpdate hook for organization plugin #26772

Closed
opened 2026-04-17 17:27:27 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @dnyg on GitHub (Jun 17, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/3054

Is this suited for github?

  • Yes, this is suited for github

Since we have a creation and deletion hook for organizations, it would be amazing (and easily implementable) if we also had an update hook

Describe the solution you'd like

An organizationUpdate hook like

betterAuth({
  plugins: [
    organization({
      organizationUpdate: {
        afterUpdate: async (data, request) => {
          // Put logic here
        }
      }
    }
  ]
})

Describe alternatives you've considered

My current solution is to have a database trigger to handle this, but I find this solution awful

Additional context

No response

Originally created by @dnyg on GitHub (Jun 17, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/3054 ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. Since we have a creation and deletion hook for organizations, it would be amazing (and easily implementable) if we also had an update hook ### Describe the solution you'd like An `organizationUpdate` hook like ```typescript betterAuth({ plugins: [ organization({ organizationUpdate: { afterUpdate: async (data, request) => { // Put logic here } } } ] }) ``` ### Describe alternatives you've considered My current solution is to have a database trigger to handle this, but I find this solution awful ### Additional context _No response_
GiteaMirror added the lockedenhancement labels 2026-04-17 17:27:27 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 16, 2025):

Hi, @dnyg. I'm Dosu, and I'm helping the better-auth team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested an organizationUpdate hook in the organization plugin to complement existing creation and deletion hooks.
  • The goal is to have an afterUpdate callback for custom logic after an organization is updated.
  • Currently, you are using a database trigger as a workaround, which you find unsatisfactory.
  • There has been no further activity or discussion on this request.

Next Steps:

  • Please let me know if this feature is still relevant to your use case with the latest version of better-auth by commenting on this issue.
  • If I do not hear back within 7 days, I will automatically close this issue.

Thank you for your understanding and contribution!

<!-- gh-comment-id:3299427455 --> @dosubot[bot] commented on GitHub (Sep 16, 2025): Hi, @dnyg. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog and am marking this issue as stale. **Issue Summary:** - You requested an `organizationUpdate` hook in the organization plugin to complement existing creation and deletion hooks. - The goal is to have an `afterUpdate` callback for custom logic after an organization is updated. - Currently, you are using a database trigger as a workaround, which you find unsatisfactory. - There has been no further activity or discussion on this request. **Next Steps:** - Please let me know if this feature is still relevant to your use case with the latest version of better-auth by commenting on this issue. - If I do not hear back within 7 days, I will automatically close this issue. Thank you for your understanding and contribution!
Author
Owner

@dnyg commented on GitHub (Sep 17, 2025):

This feature has actually already been implemented now, so I am very happy. I am closing it as completed

<!-- gh-comment-id:3301669989 --> @dnyg commented on GitHub (Sep 17, 2025): This feature has actually already been implemented now, so I am very happy. I am closing it as completed
Author
Owner

@dosubot[bot] commented on GitHub (Sep 17, 2025):

Thank you for your contribution and for closing this issue, dnyg! We appreciate your help.

<!-- gh-comment-id:3301670266 --> @dosubot[bot] commented on GitHub (Sep 17, 2025): Thank you for your contribution and for closing this issue, dnyg! We appreciate your help.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#26772