[GH-ISSUE #905] API changing too often #25817

Closed
opened 2026-04-17 16:04:43 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @darklight9811 on GitHub (Dec 16, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/905

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

Checkout the api in all 1.0.* versions

Current vs. Expected behavior

I don't know if better-auth actually follows semver, but its hard to keep track of all the features being removed (without deprecation), I already changed my auth code 3 times since 1.0.0 because I really would like to follow the new versions. This introduced a few bugs:

  • onSuccess not being called when set directly from authClient declaration
  • set-auth-token header (bearer plugin) not being accessible from onSuccess callback on signIn/signUp

I started getting the token from the useSession, but then got removed, then I moved to the callback from the signIn/signUp, but then got removed, then I moved to the onSuccess callback, but its not accessible. I'm not raging, but its really frustrating.

What version of Better Auth are you using?

1.0.21

Provide environment information

- Windows 10
- any

Which area(s) are affected? (Select all that apply)

Package

Auth config (if applicable)

No response

Additional context

No response

Originally created by @darklight9811 on GitHub (Dec 16, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/905 ### Is this suited for github? - [X] Yes, this is suited for github ### To Reproduce Checkout the api in all 1.0.* versions ### Current vs. Expected behavior I don't know if better-auth actually follows semver, but its hard to keep track of all the features being removed (without deprecation), I already changed my auth code 3 times since 1.0.0 because I really would like to follow the new versions. This introduced a few bugs: - onSuccess not being called when set directly from authClient declaration - set-auth-token header (bearer plugin) not being accessible from onSuccess callback on signIn/signUp I started getting the token from the useSession, but then got removed, then I moved to the callback from the signIn/signUp, but then got removed, then I moved to the onSuccess callback, but its not accessible. I'm not raging, but its really frustrating. ### What version of Better Auth are you using? 1.0.21 ### Provide environment information ```bash - Windows 10 - any ``` ### Which area(s) are affected? (Select all that apply) Package ### Auth config (if applicable) _No response_ ### Additional context _No response_
GiteaMirror added the lockedbug labels 2026-04-17 16:04:43 -05:00
Author
Owner

@Bekacru commented on GitHub (Dec 16, 2024):

We don't strictly follow semver, but we try to avoid changing APIs frequently, especially in patch releases, unless it's a security risk. The auth-token change was introduced to prevent the use of unsigned tokens with the bearer plugin.

Regarding the onSuccess callback not being triggered, I don’t believe anything has changed. If you have an onSuccess callback in the actual call, the global one defined in createAuthClient won’t be executed. This behavior has been consistent from the start, cause the local instance overrides the global callback.

<!-- gh-comment-id:2544908087 --> @Bekacru commented on GitHub (Dec 16, 2024): We don't strictly follow semver, but we try to avoid changing APIs frequently, especially in patch releases, unless it's a security risk. The auth-token change was introduced to prevent the use of unsigned tokens with the bearer plugin. Regarding the onSuccess callback not being triggered, I don’t believe anything has changed. If you have an onSuccess callback in the actual call, the global one defined in createAuthClient won’t be executed. This behavior has been consistent from the start, cause the local instance overrides the global callback.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#25817