better-auth
Bug Fixes
- Fixed
/admin/create-userleaving a user without a credential account when creating that account failed, such as a database hook throwing, which made retrying with the same email fail withUSER_ALREADY_EXISTS_USE_ANOTHER_EMAIL(#12338) - Fixed
/admin/create-userleaving a user without a credential account when the password was rejected, such as by the Have I Been Pwned plugin, which made retrying with the same email fail withUSER_ALREADY_EXISTS_USE_ANOTHER_EMAIL(#12335) - Fixed client actions ignoring the HTTP method passed in second-argument fetch options, and attaching a request body when the method was a lowercase
getorHEAD(#12336) - Fixed plugin schema overrides (
modelNameand field names) leaking into other instances of the same plugin in one process (#12319) - Fixed
/device/tokenreturninginvalid_grantinstead ofinvalid_clientwhenvalidateClientrejects theclient_id, matching/device/codeand RFC 6749 section 5.2 (#12246) - Fixed OAuth sign-in failing with
state_mismatchduring the daylight saving time fall-back hour when OAuth state is stored in the database and the server's time zone observes daylight saving time (#12320) - Fixed the OpenAPI schema to document query parameters for endpoints whose query schema is wrapped in
z.optional(), such as/get-sessionand Stripe's/subscription/list(#12337) - Fixed
organization.getInvitationto return theINVITATION_NOT_FOUNDcode for a missing, expired, or non-pending invitation (#12332) - Fixed
listMembersfailing with a syntax error on PostgreSQL and MSSQL when the filter matches no members or the offset is past the last member (#12318) - Fixed the
active-sessionslist in secondary storage being stored without an expiry when every remaining session had less than a second left (#12323) - Fixed SIWE sign-in leaving a user behind when creating its wallet address or account failed, which blocked that wallet from signing in again (#12366)
- Fixed social sign-up hanging on single-connection databases when the username plugin is enabled and the provider profile maps a username (#12340)
For detailed changes, see CHANGELOG
auth
Bug Fixes
- Fixed CLI commands hanging or exiting with code 0 at a prompt in CI or without a terminal. They now exit with code 2 and name what they need, such as
--yes, and prompts appear on stderr so redirecting stdout no longer hides them (#12286) - Fixed CLI notices mixing into command output.
auth info --json --copynow prints valid JSON,auth secretprints only theBETTER_AUTH_SECRETline on stdout,auth loginandauth logoutmessages go to stderr, andauth infoshows tips only in an interactive terminal (#12287) - Fixed CLI errors printing a stack trace instead of the cause. Config and database errors now show their message, and a mistyped
--configpath reports that the file doesn't exist.auth mcpandauth aino longer report success after a failed step (#12305) - Fixed the CLI exiting with code 0 after a canceled or failed run. Canceling or declining a prompt, or pressing Ctrl+C, now exits with 130, and failures such as a missing config file or a failed
auth mcpsetup exit with 1 (#12275)
For detailed changes, see CHANGELOG
@better-auth/oauth-provider
Bug Fixes
- Fixed
auth.api.oauth2Consent({ headers, body })failing withrequest not foundwhen called from a server route (#12325) - Fixed a client secret without the configured
prefix.clientSecretgetting a different error than other wrong secrets. It now gets the standardinvalid_clientresponse: 401 with aWWW-Authenticate: Basicchallenge forclient_secret_basic, and 400 forclient_secret_post(#12327) - Fixed OAuth client
metadatabeing stored as a JSON string in itsjsoncolumn. It is now written as an object, so Postgresjsonboperators such as->and@>work with adapters that pass JSON through natively (Drizzlepg). Rows written as strings by earlier versions are still read (#12328)
For detailed changes, see CHANGELOG
@better-auth/core
Bug Fixes
- Fixed failed fallback join queries printing the raw database error, including SQL and bound values, with
console.errorin addition to the configured logger (#12317) - Fixed
getAccessTokenandrefreshTokenreturning the expired access token when a provider refuses a token refresh with a 200 status, as GitHub does (#12369)
For detailed changes, see CHANGELOG
@better-auth/expo
Bug Fixes
- Fixed the Expo authorization proxy logging a provider configuration error on every OAuth sign-in when a social provider is set up for ID token sign-in only, such as Apple without a client secret (#12368)
For detailed changes, see CHANGELOG
@better-auth/mcp
Bug Fixes
- Fixed MCP rejecting plain-HTTP
resourceURLs on.localhostsubdomains as non-HTTPS (#12322)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
@Adnan-Husayn, @AryaKesharwani, @binaryshrey, @bytaesu, @Faiziimam, @Gourav224, @jashkarangiya, @NoiceHax, @PhillJK, @Tushar-Khandelwal-2004, @Tyagiquamar, @umeraamir69, @unjica, @YIOYIOIOI
Full changelog: v1.7.18...v1.7.19