[GH-ISSUE #1655] Support Data Root Wrapper on API Responses to Avoid Root-Level Array Issues #8852

Closed
opened 2026-04-13 04:05:35 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @solarsoft0 on GitHub (Mar 3, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/1655

Is this suited for github?

  • Yes, this is suited for github

Some environments (e.g., Encore.dev) don’t support root-level arrays on typed API, breaking better-auth client responses expectation.

Describe the solution you'd like

Standardizing with JSend or having a root data wrapper ensures compatibility, consistency, and easier client integration. making better-auth truly backend-agnostic. Thoughts?

Describe alternatives you've considered

Additional context

No response

Originally created by @solarsoft0 on GitHub (Mar 3, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/1655 ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. Some environments (e.g., Encore.dev) don’t support root-level arrays on typed API, breaking better-auth client responses expectation. ### Describe the solution you'd like Standardizing with [JSend](https://github.com/omniti-labs/jsend) or having a root data wrapper ensures compatibility, consistency, and easier client integration. making better-auth truly backend-agnostic. Thoughts? ### Describe alternatives you've considered - ### Additional context _No response_
GiteaMirror added the locked label 2026-04-13 04:05:35 -05:00
Author
Owner

@solarsoft0 commented on GitHub (Mar 3, 2025):

@Bekacru 👋🏾

<!-- gh-comment-id:2694363876 --> @solarsoft0 commented on GitHub (Mar 3, 2025): @Bekacru 👋🏾
Author
Owner

@solarsoft0 commented on GitHub (Mar 6, 2025):

i think i will send a PR for this.

<!-- gh-comment-id:2703790772 --> @solarsoft0 commented on GitHub (Mar 6, 2025): i think i will send a PR for this.
Author
Owner

@abdul-mustapha commented on GitHub (May 16, 2025):

i think i will send a PR for this.

Did you manage to find a way to get this working?

<!-- gh-comment-id:2886802393 --> @abdul-mustapha commented on GitHub (May 16, 2025): > i think i will send a PR for this. > Did you manage to find a way to get this working?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8852