type issues in authClient email callback #855

Closed
opened 2026-03-13 08:07:23 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @necmettindev on GitHub (Mar 15, 2025).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

Image

Current vs. Expected behavior

All callbacks works but given type errors

What version of Better Auth are you using?

1.2.5-beta.2

Provide environment information

Not related

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

Client

Auth config (if applicable)

await signIn.email(
      {
        email: data.email,
        password: data.password,
        rememberMe: data.rememberMe,
        callbackURL: "/auth/organization",
        fetchOptions: { headers },
      },
      {
        onRequest: () => setIsLoading(true),
        onResponse: () => setIsLoading(false),
        onError(c) {
          toast.error("Failed to sign in", { description: c.error.message });
          captchaRef.current?.reset();
        },
      },
    );
  };

Additional context

No response

Originally created by @necmettindev on GitHub (Mar 15, 2025). ### Is this suited for github? - [ ] Yes, this is suited for github ### To Reproduce <img width="806" alt="Image" src="https://github.com/user-attachments/assets/ecc2154b-c971-4580-bba4-97ab14429fda" /> ### Current vs. Expected behavior All callbacks works but given type errors ### What version of Better Auth are you using? 1.2.5-beta.2 ### Provide environment information ```bash Not related ``` ### Which area(s) are affected? (Select all that apply) Client ### Auth config (if applicable) ```typescript await signIn.email( { email: data.email, password: data.password, rememberMe: data.rememberMe, callbackURL: "/auth/organization", fetchOptions: { headers }, }, { onRequest: () => setIsLoading(true), onResponse: () => setIsLoading(false), onError(c) { toast.error("Failed to sign in", { description: c.error.message }); captchaRef.current?.reset(); }, }, ); }; ``` ### Additional context _No response_
GiteaMirror added the bug label 2026-03-13 08:07:23 -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#855