Have an exported AuthClient type (analog to the Auth exported type for server-side) #292

Closed
opened 2026-03-13 07:40:57 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @bfovez on GitHub (Nov 28, 2024).

Is your feature request related to a problem? Please describe.
I would like to factorize an instance of authClient created by createAuthClient({ baseURL })

Describe the solution you'd like
Have an exported AuthClient type, analog to the Auth type for server-side.

Originally created by @bfovez on GitHub (Nov 28, 2024). **Is your feature request related to a problem? Please describe.** I would like to factorize an instance of `authClient `created by `createAuthClient({ baseURL })` **Describe the solution you'd like** Have an exported `AuthClient` type, analog to the `Auth` type for server-side.
Author
Owner

@Bekacru commented on GitHub (Nov 28, 2024):

You can just use ReturnType<typeof createAuthClient<any>>, but I still wouldn't recommend inferring the auth client like that, as it relies on a lot of generic inference. (same for Auth)

@Bekacru commented on GitHub (Nov 28, 2024): You can just use `ReturnType<typeof createAuthClient<any>>`, but I still wouldn't recommend inferring the auth client like that, as it relies on a lot of generic inference. (same for `Auth`)
Author
Owner

@bfovez commented on GitHub (Nov 28, 2024):

Thank for the tip.

@bfovez commented on GitHub (Nov 28, 2024): Thank for the tip.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#292