[PR #5815] [MERGED] feat(client): add type helper AuthClient #6245

Closed
opened 2026-03-13 12:52:15 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5815
Author: @himself65
Created: 11/7/2025
Status: Merged
Merged: 11/7/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/11/06/helper


📝 Commits (1)

  • def9fc5 feat(client): add type helper AuthClient

📊 Changes

6 files changed (+22 additions, -10 deletions)

View changed files

📝 e2e/smoke/test/ssr.ts (+8 -3)
📝 e2e/smoke/tsconfig.json (+1 -0)
📝 packages/better-auth/src/client/vanilla.ts (+4 -0)
📝 packages/better-auth/src/plugins/api-key/client.ts (+2 -0)
📝 packages/better-auth/src/plugins/oidc-provider/client.ts (+2 -0)
📝 packages/better-auth/src/plugins/oidc-provider/oidc.test.ts (+5 -7)

📄 Description

Summary by cubic

Adds a new AuthClient type helper and plugin type aliases to simplify and strengthen typing for createAuthClient and client plugins. Updates tests to use the new types for clearer, safer client declarations.

  • New Features

    • Exported AuthClient as a typed alias for createAuthClient.
    • Exported ApiKeyClientPlugin and OidcClientPlugin type helpers.
  • Refactors

    • Updated SSR and OIDC tests to use the new type helpers.
    • Added customConditions: [] in e2e tsconfig.
    • No runtime changes.

Written for commit def9fc5427. Summary will update automatically 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/5815 **Author:** [@himself65](https://github.com/himself65) **Created:** 11/7/2025 **Status:** ✅ Merged **Merged:** 11/7/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/11/06/helper` --- ### 📝 Commits (1) - [`def9fc5`](https://github.com/better-auth/better-auth/commit/def9fc54276e56eb505c7dbc43b2a9417cbc015a) feat(client): add type helper `AuthClient` ### 📊 Changes **6 files changed** (+22 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `e2e/smoke/test/ssr.ts` (+8 -3) 📝 `e2e/smoke/tsconfig.json` (+1 -0) 📝 `packages/better-auth/src/client/vanilla.ts` (+4 -0) 📝 `packages/better-auth/src/plugins/api-key/client.ts` (+2 -0) 📝 `packages/better-auth/src/plugins/oidc-provider/client.ts` (+2 -0) 📝 `packages/better-auth/src/plugins/oidc-provider/oidc.test.ts` (+5 -7) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Adds a new AuthClient type helper and plugin type aliases to simplify and strengthen typing for createAuthClient and client plugins. Updates tests to use the new types for clearer, safer client declarations. - **New Features** - Exported AuthClient<Option> as a typed alias for createAuthClient. - Exported ApiKeyClientPlugin and OidcClientPlugin type helpers. - **Refactors** - Updated SSR and OIDC tests to use the new type helpers. - Added customConditions: [] in e2e tsconfig. - No runtime changes. <sup>Written for commit def9fc54276e56eb505c7dbc43b2a9417cbc015a. Summary will update automatically 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 12:52:15 -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#6245