refactor(auth)!: split session state from client actions#339
Open
refactor(auth)!: split session state from client actions#339
Conversation
Contributor
|
Deployment failed with the following error: Learn More: https://vercel.com/maximogarciamartinezs-projects?upgradeToPro=build-rate-limit |
commit: |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
better-auth | bef644a | May 06 2026, 02:10 PM |
202af42 to
2b23ae7
Compare
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
2b23ae7 to
bef644a
Compare
Contributor
|
This new API seems a bit weird to me: const signInEmail = useSignIn('email')
const signUpEmail = useSignUp('email')
const client = useAuthClient()
const sendVerificationEmail = useAuthClientAction(client => client.sendVerificationEmail)Isn't possible to have guessable API like: auth.signUp.email
auth.signOut |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a breaking cleanup for the Pinia issue found while testing #295.
useUserSession()now returns only session state and session lifecycle actions, so it can be returned directly from Pinia setup stores without forwarding Better Auth's dynamic client proxies through store state.Auth calls move to explicit composables (which is much better dx overall!):
Old patterns like these no longer work: