Better Auth

BA

Better Auth

Join the community to ask questions about Better Auth and get answers from other members.

Join

bug-reports

help

Regression due to changed types in admin plugin hooks since v1.3.28

Since v1.3.28 the following configuration no longer passes typechecks: ```ts import { betterAuth } from 'better-auth' import { admin } from 'better-auth/plugins' ...

Coookies not saved when using cookiePrefix with remote backend and expo client.

Hi, I'm using hono js backend and expo mobile app. I had cookiePrefix set on my auth configuration on the backend, And when tried to gget the session, It returned null. After lil debugging, found that cookies are not being saved. I removed the prefix, everything working fine.

onInvitationAccepted is not found

I tried using onInvitationAccepted while developing, but the app didn’t work properly. I searched for it in the better-auth repo, but couldn’t find it. Maybe the function name has changed, but some old references to it are still around?

Use OTP for changing email bug?

I'm trying to use OTP for changing an email. I'm using the email OTP config: overrideDefaultEmailVerification: true but it does not seem to override the default options at all?

Bug createOrganization

When creating an organization and passing the userId, the value of this ID is not being used. Registration is being done using the ID of the user who is performing the registration action.
No description

State mismatch with Twitch Oauth if automatic redirect doesn't work.

If automatic redirect doesnt work, a state mismatch is received when the user clicks the 'here' button. This is causing issues since my server serves 2 different apps. The server relies on the twitch redirect to pass location info so it can deep link the user to the proper application.
No description

Additionalfields

Hi, does anybody have an idea if there is any way to fix incomplete AdditionalFields for organization as in the issue? https://github.com/better-auth/better-auth/issues/5234...

`state_mismatch` On Latest Release

same application with no changes works fine on 1.3.18; if you upgrade to the latest release all OAuth providers are giving state_mismatch error.

Is there an update on this Org. plugin breaking issue ?

Hey folks, Is there an update on this issue? Only happens when dynamicAccessControl: true...

Error getting response from Convex

There is an issue with version 1.3.25 and above when trying to get a response from Convex. All lower versions work fine. Requests fail with this error.
No description

UPDATE: getInvitation return 403 Forbidden

The API method cancelInvitation getInvitation return 403 Forbidden also if is called by the owner of the organization. I suppose the owner of the organization can delete get an invitation

2 same requests are made to a secondary storage

Better Auth is writing to the cache twice for the same session token within milliseconds of each other. The issue can be reproduced by adding secondary storage to the client and making an API request to sign-in/email endpoint
No description

Anonymous sign-in should return `isAnonymous` property

Be it a bug or not, but I think signing in an anonymous user should return with the isAnonymous property set as true in the user object. I've included two screenshots: The type returned, and the user object logged to the console to show it does not contain the property....
No description

Error Changing user email in server from client (URGENT) EXPRESS JS

when i invoke change email from my client const UpdateEmail = await axios.post("/api/auth/change-email", { newEmail:values.email }, { withCredentials:true ,baseURL:process.env.NEXT_PUBLIC_SERVER_URL}); ...

Normalization inconsistency

* Calling auth.api.createUser() will normalize the username to lower case (as is documented). * Calling auth.api.adminUpdateUser will not normalize the username to lower case....

auth.api.setUserPassword always returns `{status:true}`

auth.api.setUserPassword always returns {status:true}

FAILED_TO_GET_SESSION in user signout (latest version)

Hi there, I am using: "better-auth": "^1.3.24",...

Sveltekit error Error: Cannot use relative URL (/api/auth/get-session)

Error: Cannot use relative URL (/api/auth/get-session) with global fetch — use `event.fetch` instead: https://svelte.dev/docs/kit/web-standards#fetch-apis
at globalThis.fetch
Error: Cannot use relative URL (/api/auth/get-session) with global fetch — use `event.fetch` instead: https://svelte.dev/docs/kit/web-standards#fetch-apis
at globalThis.fetch
I think this is related to some update to sveltekit...
Next