[PR #4175] [MERGED] fix: resolve field naming inconsistency in account listing endpoint #22137

Closed
opened 2026-04-15 20:50:45 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4175
Author: @Kinfe123
Created: 8/23/2025
Status: Merged
Merged: 8/29/2025
Merged by: @himself65

Base: canaryHead: fix/list-accounts-provider-field-naming


📝 Commits (2)

  • e9ddb4f fix: resolve field naming inconsistency in account listing endpoint
  • 43f4da4 Merge branch 'canary' into fix/list-accounts-provider-field-naming

📊 Changes

2 files changed (+21 additions, -21 deletions)

View changed files

📝 packages/better-auth/src/api/routes/account.test.ts (+4 -4)
📝 packages/better-auth/src/api/routes/account.ts (+17 -17)

📄 Description

Closes #4174

Summary by cubic

Standardized the account listing endpoint to use providerId instead of provider. Aligns the response and schema with the accounts model to remove confusion.

  • Bug Fixes

    • Renamed provider -> providerId in listUserAccounts response and schema.
    • Set required fields: id, providerId, createdAt, updatedAt, accountId, scopes.
    • Updated handler mapping and tests to use providerId.
  • Migration

    • Replace account.provider with account.providerId in client code and filters.
    • Update any types or schemas that referenced provider.

🔄 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/4175 **Author:** [@Kinfe123](https://github.com/Kinfe123) **Created:** 8/23/2025 **Status:** ✅ Merged **Merged:** 8/29/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/list-accounts-provider-field-naming` --- ### 📝 Commits (2) - [`e9ddb4f`](https://github.com/better-auth/better-auth/commit/e9ddb4fb92a058691d51b8e95388b960e4f2ce0a) fix: resolve field naming inconsistency in account listing endpoint - [`43f4da4`](https://github.com/better-auth/better-auth/commit/43f4da4b374c46126bde1a488f91d1ec99ecd4ba) Merge branch 'canary' into fix/list-accounts-provider-field-naming ### 📊 Changes **2 files changed** (+21 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/routes/account.test.ts` (+4 -4) 📝 `packages/better-auth/src/api/routes/account.ts` (+17 -17) </details> ### 📄 Description Closes #4174 <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Standardized the account listing endpoint to use providerId instead of provider. Aligns the response and schema with the accounts model to remove confusion. - **Bug Fixes** - Renamed provider -> providerId in listUserAccounts response and schema. - Set required fields: id, providerId, createdAt, updatedAt, accountId, scopes. - Updated handler mapping and tests to use providerId. - **Migration** - Replace account.provider with account.providerId in client code and filters. - Update any types or schemas that referenced provider. <!-- 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-04-15 20:50:45 -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#22137