[PR #7410] [CLOSED] fix: deeply merge client actions #7293

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7410
Author: @jslno
Created: 1/16/2026
Status: Closed

Base: canaryHead: 16-01-2026/fix-plugin-action-override


📝 Commits (3)

📊 Changes

1 file changed (+6 additions, -9 deletions)

View changed files

📝 packages/better-auth/src/client/config.ts (+6 -9)

📄 Description

Related: https://discord.com/channels/1288403910284935179/1461599895474409617/1461599895474409617


Summary by cubic

Use deep merge for client plugin actions to prevent nested actions from being overwritten. This ensures all plugin actions compose correctly in getClientConfig.

  • Bug Fixes
    • Replaced shallow Object.assign with defu to deeply merge actions from all plugins.
    • Prevents collisions when multiple plugins define nested action keys, preserving all actions.

Written for commit 1b81e58331. 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/7410 **Author:** [@jslno](https://github.com/jslno) **Created:** 1/16/2026 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `16-01-2026/fix-plugin-action-override` --- ### 📝 Commits (3) - [`2212328`](https://github.com/better-auth/better-auth/commit/22123287580c86e15c560b2364000ff3a3208d82) fix: deeply merge client actions - [`91af6b5`](https://github.com/better-auth/better-auth/commit/91af6b545046b22c939885284ec400c1898e3fa0) chore: cleanup - [`1b81e58`](https://github.com/better-auth/better-auth/commit/1b81e58331ad7a397fbefba6d9f43e6fbb7db610) fix: spread array ### 📊 Changes **1 file changed** (+6 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/client/config.ts` (+6 -9) </details> ### 📄 Description Related: https://discord.com/channels/1288403910284935179/1461599895474409617/1461599895474409617 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Use deep merge for client plugin actions to prevent nested actions from being overwritten. This ensures all plugin actions compose correctly in getClientConfig. - **Bug Fixes** - Replaced shallow Object.assign with defu to deeply merge actions from all plugins. - Prevents collisions when multiple plugins define nested action keys, preserving all actions. <sup>Written for commit 1b81e58331ad7a397fbefba6d9f43e6fbb7db610. 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:30:59 -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#7293