Update dependency better-auth to v1.7.29 #30
No reviewers
Labels
No labels
accessibility
area:accounts
area:ai-evals
area:look
area:maps
area:platform
area:rides-progress
area:riding
area:today-plan-coach
area:ui-shell
bot:blocked
bot:failed
bot:pr
bot:waiting
bot:working
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
later
now
owner-check
parked
question
ready
session
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ckreidl/trainer!30
Loading…
Reference in a new issue
No description provided.
Delete branch "renovate/better-auth-1.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
1.7.25→1.7.29Release Notes
better-auth/better-auth (better-auth)
v1.7.29Compare Source
Patch Changes
#12959
017a985Thanks @bytaesu! - Sign-up no longer fails, or stores a wrong value, when the request includes aninput: falsefield whosedefaultValueis a function.#12962
59da7fbThanks @bytaesu! -oneTap({ disableSignUp: true })was ignored and/one-tap/callbackstill created new users. It now closes sign-up, anddisableSignupstays as a deprecated alias.#12952
b87f41fThanks @bytaesu! - Organization dynamic role names are now trimmed when created or renamed, and names that are empty or contain a comma are rejected withINVALID_ROLE_NAME.#12956
61bfa16Thanks @gustavovalverde! - Email OTP and phone number codes resent while a wrong guess was being checked are no longer replaced by the old code when verification lives only in secondary storage.#12975
fcd3cbfThanks @gustavovalverde! - WithresendStrategy: "reuse", an email OTP resend no longer repeats a code that was used or removed before the resend could extend its expiry. It sends a new code instead.#12958
bde96d1Thanks @gustavovalverde! - Email OTP and phone number OTP no longer send a code when averification.create.beforedatabase hook returnsfalse. Before, the code was sent even though it was never stored, so every attempt to use it failed withINVALID_OTP.createVerificationOTPnow fail withFAILED_TO_CREATE_VERIFICATION(HTTP 500).disableSignUpis set.sendVerificationOnSignUp, sign-up still succeeds without sending a code, and the error is logged. The user can request a new code later.#12975
fcd3cbfThanks @gustavovalverde! - Email OTP and phone number OTP no longer send a code when averification.update.beforedatabase hook blocks it from replacing an earlier code. Before, a send that overlapped an earlier one could deliver a code that was never stored, so it always failed withINVALID_OTP. The send now fails withFAILED_TO_CREATE_VERIFICATION, or returns the usual reply on endpoints that hide whether an account exists.#12969
a55ade9Thanks @gustavovalverde! - When secondary storage fails, Better Auth logs and rethrows the error without the keys and values it was called with, so session tokens and cached sessions no longer reach application logs. The error keeps its name, message, and properties, such as the Redis command name, except where they contain one of those keys or values.#12956
61bfa16Thanks @gustavovalverde! - Two-factor OTP codes resent while a wrong guess was being checked are no longer rejected in favor of the old code.#12955
6b883acThanks @bytaesu! - Two-factor enable, disable and enrollment now keep the original sign-in time when they replace the session, even after a password check, so the replacement is only as fresh as the session it replaces forsession.freshAge.#12975
fcd3cbfThanks @gustavovalverde! -update.afterdatabase hooks no longer run when an update matches no record. Before, they ran withnull, although their type promises the updated record, so hooks that read a field, such as the Stripe plugin's user hook, could throw.#12975
fcd3cbfThanks @gustavovalverde! -verification.updatedatabase hooks now run when verification values are kept in secondary storage, asverification.createhooks already did. Withverification.storeInDatabase, secondary storage now changes only after the database update succeeds, so an update that a hook blocks or that finds no row leaves both stores with the same value.#12958
bde96d1Thanks @gustavovalverde! - Magic link, password reset, account deletion, one-time token, SIWE nonce, two-factor OTP, and two-factor sign-in no longer hand out a link, code, token, or challenge when averification.create.beforedatabase hook returnsfalse. Before, they sent something that could never be verified. Most of these endpoints now fail withFAILED_TO_CREATE_VERIFICATION(HTTP 500). Password reset sends no email and returns its usual reply, so it still does not reveal whether the account exists. Sign-in still succeeds when the hook vetoes an optional record: a trusted device is not trusted, and theset-ottheader is left out.Updated dependencies [
55513e8,55513e8,23adcb1,bde96d1,a55ade9,fcd3cbf]:v1.7.28Compare Source
Patch Changes
#12806
47a77c0Thanks @bytaesu! - Revoked sessions are now removed from secondary storage even when a databaseafterhook throws during password reset or user deletion. Before, they could stay valid until they expired.#12858
7e229f0Thanks @bytaesu! - Deleting a user no longer reports success when a database read fails, auser.delete.beforehook vetoes the delete, or the database skips it without an error. A failed read now surfaces as an error. A veto or a skipped delete answersFAILED_TO_DELETE_USERand keeps the user's sessions and accounts, on databases with transactions for a skipped delete.user.delete.beforenow runs before the session and account deletes.#12853
2ba7622Thanks @bytaesu! - Fix/device/codereturning a 500 on a user or device code collision with the Drizzle adapter. The collision is now retried with a new code, as with the other adapters.#12893
a3a9d2dThanks @bytaesu! - When two email OTP requests for the same address collide on a database with a uniqueverification.identifier, both emails now carry the same code when it can be read back. Before, the code in one of the emails was rejected as invalid.#12893
a3a9d2dThanks @bytaesu! - Sending a new email OTP now replaces the earlier code for that address instead of keeping it. Before, a code resent after a wrong guess, or in the same millisecond as another send, could be refused while the earlier code still worked.#12893
a3a9d2dThanks @bytaesu! - Sending a new phone number OTP now replaces the earlier code for that number instead of keeping it, so a code sent while another one is being checked stays valid.#12893
a3a9d2dThanks @bytaesu! - Verifying a phone number that no user has, withoutsignUpOnVerification, now returns a 400PHONE_NUMBER_NOT_EXISTerror instead of a 500.#12858
7e229f0Thanks @bytaesu! -/revoke-sessionand/admin/revoke-user-sessionno longer report success when the session survives, such as when asession.delete.beforehook vetoes the delete or the database read before the delete fails.#12858
7e229f0Thanks @bytaesu! - Revoking all of a user's sessions now fails whensecondaryStoragecannot clean up the cached sessions, after the remaining delete hooks have run. Previously the call reported success, and the cached sessions could keep working until they expired.#12858
7e229f0Thanks @bytaesu! - A session cached insecondaryStoragewithout its user no longer breaksgetSession. The user is now read from the database, wheregetSessionpreviously failed for every request until the cached session expired.#12907
d079059Thanks @gustavovalverde! -generateBackupCodesrefreshes store-backed sessions before checking whether two-factor authentication is enabled. A session cached before enrollment can now generate backup codes, and a revoked session is rejected even while its cookie is still cached.#12860
3011e5cThanks @bytaesu! - Theusernameplugin now checks usernames on/update-useragainst the session the endpoint resolved, so re-sending your own username with a bearer token no longer fails as already taken. Signed-out/update-usercalls with a taken username now return 401 like other signed-out calls.Updated dependencies [
47a77c0,7e229f0,35df753,ddec4d7,7e229f0,a879d3d]:v1.7.27Compare Source
Patch Changes
#12809
1ab8e21Thanks @bytaesu! - Validate the request origin on/sign-in/anonymous, the same way the other sign-in endpoints do. A browser request from an origin outsidetrustedOriginsnow gets a 403.#12805
c6fd56dThanks @bytaesu! - FixPOSTrequests sent without a body, such as/sign-outor/revoke-sessions, failing with 415 on Deno, Next.js, Nuxt and other servers that pass an empty stream as the request body.#12655
00f5017Thanks @gustavovalverde! - Tokens signed without a pinned algorithm, such as ID tokens and session JWTs, now prefer a key forjwks.keyPairConfig.alg. Before, if the first signature on an empty key set pinned an algorithm listed injwks.keyPairConfigs, later unpinned tokens reused that key instead of creating one for the primary algorithm. An existing key whose algorithm is not listed injwks.keyPairConfigsis still reused.A deployment already in the affected state, with no key for
jwks.keyPairConfig.algand a newest key for anotherjwks.keyPairConfigsalgorithm, creates a key forjwks.keyPairConfig.algon its next unpinned signature. This includes a deployment whose old primary algorithm moved intojwks.keyPairConfigs. A deployment that already has a key forjwks.keyPairConfig.algkeeps its currentalgandkid. ID tokens,/tokenJWTs, and cookie-cache JWTs of an affected deployment then changealgandkid. Earlier tokens keep verifying bykid, but verifiers that hard-code the old algorithm, or never refetch the JWKS for an unknownkid, must adapt. A customadapter.getJwkskeyring is unchanged: unpinned tokens keep using its newest key, and no key is created for it.#12810
d0a8cabThanks @bytaesu! - Fix the phone number plugin answering/update-userwith a 500 when the request has no body. It now gets the same 400 as without the plugin.#12553
ac7c317Thanks @gustavovalverde! -getTestInstancefrombetter-auth/testnow runs every instance cleanup when one of them fails (several failures surface as anAggregateError), so later instances no longer leave their database or connection open.#12810
d0a8cabThanks @bytaesu! - Fix the username plugin answering/sign-up/emailand/update-userwith a 500 when the request has no body. It now gets the same 400 as without the plugin.Updated dependencies [
5956cb7,559c837]:v1.7.26Compare Source
Patch Changes
#12626
d34e6b1Thanks @gustavovalverde! - A verification lookup that finds an expired value now deletes it, so later lookups no longer return it. Since 1.7.24, an expired value could be returned to repeated lookups for up to a minute.#12734
ae6584cThanks @gustavovalverde! - Social providers accept agetAccountFieldsoption that stores your own values on the provider account. Return values for the fields you declare inaccount.additionalFields, and Better Auth saves them when the account is created, linked, or updated at sign-in. The option does nothing when you leave it unset, and it cannot replace the provider ID, account ID, or tokens.#12626
d34e6b1Thanks @gustavovalverde! - Two-factor sign-in now rejects an expired challenge before it sends an OTP or counts a failed attempt.Updated dependencies [
ddcb9a2,836b13e,54c1b69,cbbfab2,cbbfab2,cbbfab2,ae6584c,de4ccfd]:Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
Security
View full report
The latest updates on your projects. Learn more about Vercel for GitHub.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.