chore(deps): update dependency @better-auth/passkey to v1.5.1#32
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
chore(deps): update dependency @better-auth/passkey to v1.5.1#32renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the
Comment |
e6bf315 to
3e6106e
Compare
3e6106e to
19b63ca
Compare
19b63ca to
c474d1d
Compare
c474d1d to
0ebcaad
Compare
0ebcaad to
d91ee0f
Compare
d91ee0f to
fd0c08c
Compare
fd0c08c to
8b453f4
Compare
8b453f4 to
fdcca86
Compare
fdcca86 to
473f23c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.4.13→1.5.1Release Notes
better-auth/better-auth (@better-auth/passkey)
v1.5.1Compare Source
🐞 Bug Fixes
require- by @himself65 in #8253 (977bf)View changes on GitHub
v1.5.0Compare Source
Better Auth 1.5 Release
We’re excited to announce the release of Better Auth 1.5! 🎉
This is our biggest release yet, with over 600 commits, 70 new features, 200 bug fixes, and 7 entirely new packages. From MCP authentication to Electron desktop support, this release brings Better Auth to new platforms and use cases.
We’re also announcing our new Infrastructure product. It lets you use a full user management and analytics dashboard, security and protection tooling, audit logs, a self-service SSO UI, and more, all with your own Better Auth instance.
Starting with this release, the self-service SSO dashboard — which lets your enterprise customers onboard their own SAML providers without support tickets — is powered by Better Auth Infrastructure. If you’re using the SSO plugin in production, we recommend upgrading to the Pro or Business tier to get access to the dashboard and streamline your enterprise onboarding.
And soon, you’ll be able to host your Better Auth instance on our infrastructure as well, so you can own your auth at scale without worrying about infrastructure needs.
Sign up now: https://better-auth.com/sign-in 🚀
To upgrade, run:
🚀 Highlights
New Better Auth CLI
We’re introducing a new standalone CLI:
npx auth. This replaces the previous@better-auth/clipackage, which will be deprecated in a future release.With a single interactive command,
npx auth initscaffolds a complete Better Auth setup — configuration file, database adapter, and framework integration.All existing commands like
migrateandgenerateare available through the new CLI as well:The
generatecommand now also supports a--adapterflag, letting you generate schema output tailored to your specific database adapter without needing a full Better Auth config file:Remote MCP Auth Client
The MCP plugin now ships a framework-agnostic remote auth client. If your MCP server is separate from your Better Auth instance, you can verify tokens and protect resources without duplicating auth logic.
👉 Read more about MCP authentication
It also comes with built-in framework adapters for Hono and Express-like servers:
OAuth 2.1 Provider
The new
@better-auth/oauth-providerplugin turns your Better Auth instance into a full OAuth 2.1 authorization server with OIDC compatibility. Issue access tokens, manage client registrations, and let third-party apps authenticate against your API — including MCP agents.👉 Read more about the OAuth Provider
Key features:
authorization_code,refresh_token, andclient_credentialsgrants withopenidscope support./jwksendpoint.Note:
The OAuth 2.1 Provider replaces the previous OIDC Provider plugin, which will be deprecated in a future release. The MCP plugin will also transition to use the OAuth 2.1 Provider as its foundation. See the migration guide for upgrading from the OIDC Provider plugin.
Electron Integration
Full desktop authentication support for Electron apps. The plugin handles the complete OAuth flow — opening the system browser, exchanging authorization codes via custom protocol, and managing cookies securely.
👉 Read more about Electron integration
Internationalization (i18n)
The new i18n plugin provides type-safe error message translations with automatic locale detection from headers, cookies, or sessions.
👉 Read more about i18n
Error codes are fully typed — your IDE will autocomplete all available error codes from every registered plugin.
Typed Error Codes
Every error response now includes a machine-readable
codefield. All first-party plugins define their own typed error codes usingdefineErrorCodes, and theAPIErrorclass supports them natively.Error responses now look like:
{ "code": "USER_NOT_FOUND", "message": "User not found" }This is the foundation that the i18n plugin builds on — every error code from every plugin is discoverable at compile time, so translation dictionaries are fully type-checked.
SSO — Production Ready
The SSO plugin has received extensive hardening to be production-ready, with 23+ commits improving security and compliance.
Self-Service SSO Dashboard
As part of our new Infrastructure product, the SSO plugin is now accompanied by a self-service dashboard for onboarding enterprise customers. Organization admins can generate a shareable link that walks enterprise customers through configuring their SAML identity provider — no back-and-forth support tickets required.
The dashboard is available at:
From there, you can generate onboarding links, monitor SSO connection status, and manage provider configurations for each organization.
SAML Single Logout (SLO)
Full support for both SP-initiated and IdP-initiated SAML Single Logout:
Additional SSO Improvements
audclaim validation: Verify audience in OpenID Connect flows.Unified Before & After Hooks
Plugin hooks and global hooks now share the same
AuthMiddlewaretype, making the hooks system consistent and composable across the entire auth pipeline.Plugins use the same middleware type with matchers for targeted interception:
Dynamic Base URL
Better Auth can now resolve the base URL dynamically from incoming requests, making it work seamlessly with Vercel preview deployments, multi-domain setups, and reverse proxies.
👉 Read more about dynamic base URL
Verification on Secondary Storage
Verification tokens can now be stored in secondary storage (e.g., Redis) instead of — or in addition to — the database. Identifiers can be hashed for extra security.
You can also configure per-identifier overrides:
Rate Limiter Improvements
The rate limiter has been improved with separate request/response handling, hardened defaults, and IPv6 support.
Non-Destructive Secret Key Rotation
Better Auth now supports rotating
BETTER_AUTH_SECRETwithout invalidating existing sessions, tokens, or encrypted data. When you need to rotate your secret — whether for scheduled rotation or incident response — you can introduce a new key while keeping old keys available for decryption.Or via environment variable:
BETTER_AUTH_SECRETS="2:new-secret-key,1:old-secret-key"New data is always encrypted with the latest key (first in the array), while decryption automatically tries all configured keys. This lets you roll secrets gradually without downtime or data loss.
Seat-Based Billing (Stripe)
The Stripe plugin now supports per-seat billing for organizations. Member changes automatically sync seat quantity with Stripe.
The plugin also adds support for usage-based billing via
lineItems, subscription schedules withscheduleAtPeriodEnd, andbillingIntervaltracking.Test Utilities Plugin
A new
testUtilsplugin provides factories, database helpers, and auth utilities for integration and E2E testing.👉 Read more about test utilities
Update Session Endpoint
A new
/update-sessionendpoint allows updating custom additional session fields on the fly.This is useful when you have additional session fields that need to change without re-authentication.
Adapter Extraction
Database adapters have been extracted into their own packages. This is a major architectural change that reduces bundle size and allows adapters to be versioned independently.
@better-auth/drizzle-adapter@better-auth/prisma-adapter@better-auth/kysely-adapter@better-auth/mongo-adapter@better-auth/memory-adapterThe main
better-authpackage re-exports all adapters, so existing imports continue to work. But you can now install only the adapter you need for smaller bundles:Cloudflare D1 Support
Better Auth now natively supports Cloudflare D1 as a first-class database option. Pass your D1 binding directly — no custom adapter setup required.
The built-in D1 dialect handles query execution, batch operations, and introspection through D1's native API. Note that D1 does not support interactive transactions — Better Auth uses D1's
batch()API for atomicity instead.✨ More Features
Authentication & Sessions
verifyPasswordAPI: New server-side endpoint to verify the current user's password.setShouldSkipSessionRefresh: Programmatically skip session refresh for specific requests.deferSessionRefresh: Support for read-replica database setups.customSyntheticUseroption: Support plugin fields in enumeration-protected responses (#8097).VERCEL_URLandNEXTAUTH_URL: The client now falls back toVERCEL_URLandNEXTAUTH_URLenvironment variables when no explicitbaseURLis configured, making server-side rendering on Vercel work out of the box.OAuth & Providers
Stripe Plugin
seatPriceIdandlineItemsenable flexible subscription checkouts, supporting modern pricing models like per-seat and usage-based billing.scheduleAtPeriodEnd: Defer plan changes to end of billing period.SCIM
OAuth Provider Plugin
issparameter: Authorization response issuer identifier.prompt=nonesupport: Silent authentication for OIDC.Plugin Improvements
magic-link:allowedAttemptsoption: Limit verification attempts.email-otp: Change email flow with OTP: Users can change their email address via OTP verification, with optional current-email confirmation for added security.email-otp: Name, image, and additional fields in sign-in: Richer OTP sign-in.phone-number: Additional fields insignUpOnVerification: Pass extra data.two-factor:twoFactorCookieMaxAgeand server-side trust device expiration.one-tap: Button mode for Google sign-in.anonymous: Delete anonymous user endpoint.admin: Optional password on user creation.api-keys: Pagination for list endpoint, organization reference via metadata.organization: Function support formembershipLimit, reject expired invites.Core & Infrastructure
BetterAuthPluginRegistrytype system: Typed plugin discovery viagetPlugin()andhasPlugin().AuthContext: Access the Better Auth version at runtime.@better-auth/redis-storage.🔒 Security Improvements
/change-email: Always returns{ status: true }and simulates token generation for timing safety (#8097).We recommend going through each breaking change to ensure a smooth upgrade.
Deprecated API Removal
The
/forget-password/email-otpendpoint has been removed. Use the standard password reset flow instead.Adapter Imports
The
better-auth/adapters/testexport has been removed. Use thetestUtilsplugin instead.API Key Plugin Moved to
@better-auth/api-keyThe api-key plugin has been extracted into its own package. Install it separately:
Schema changes:
userIdfield on theApiKeytable has been renamed toreferenceId.configIdfield has been added (defaults to"default").Plugin options changes:
The
permissions.defaultPermissionscallback's first argument is nowreferenceIdinstead ofuserId:export const auth = betterAuth({ plugins: [ apiKey({ permissions: { - defaultPermissions: async (userId, ctx) => { + defaultPermissions: async (referenceId, ctx) => { return { files: ["read"], users: ["read"], }; }, } }) ] })Client SDK changes:
🛠 Developer Changes
If you are building a plugin on top of Better Auth, there are a few things you should know.
@deprecatedAPIs Are RemovedAll previously deprecated APIs have been removed. This includes deprecated adapter types, client types, helper types, and plugin options. If you were relying on any
@deprecatedmethods or options, you'll need to migrate to their replacements:createAdaptercreateAdapterFactoryAdapterDBAdapterTransactionAdapterDBTransactionAdapterStore(client)ClientStoreAtomListener(client)ClientAtomListenerClientOptionsBetterAuthClientOptionsLiteralUnion,DeepPartial(frombetter-auth/types/helper)@better-auth/coreonEmailVerificationafterEmailVerificationsendChangeEmailVerificationsendChangeEmailConfirmationadvanced.database.useNumberIdadvanced.database.generateId: "serial"permissionfieldpermissions(plural)@better-auth/core/utilsBarrel Export RemovedThe
@better-auth/core/utilsbarrel export has been split into individual subpath exports to improve tree-shaking:$ERROR_CODESType Changed toRawErrorObjectsThe
$ERROR_CODESfield on plugins now expectsRecord<string, RawError>instead ofRecord<string, string>. UsedefineErrorCodes()which now returnsRawErrorobjects with{ code, message }instead of plain strings:Use the new
APIError.from()static method to throw errors with error codes:PluginContextIs Now GenericPluginContextis now parameterized withOptions:Plugins can register themselves via module augmentation for type-safe
getPlugin()andhasPlugin():InferUser/InferSessionTypes RemovedThe
InferUser<O>andInferSession<O>types have been removed. Use the genericUserandSessiontypes instead:After Hooks Now Run Post-Transaction
Database "after" hooks (
create.after,update.after,delete.after) now execute after the transaction commits, not during it. This prevents issues where hooks interacting with external systems (sending emails, calling APIs) could fail and roll back the entire transaction.If your plugin relies on after hooks running inside the transaction for additional atomic database writes, you'll need to use the adapter directly within the main operation instead.
getMigrationsMoved tobetter-auth/db/migrationSubpathWe found that the
getMigrationsfunction includes many third-party dependencies, which caused some bundlers to unexpectedly include extra dependencies and increase output size. It's now available from a dedicated subpath:idField Removed from Session in Secondary StorageThe
idfield is used to determine relationships between structures in database models. We've removed it from secondary storage since it's not necessary there, simplifying the storage logic. If your plugin reads sessions from secondary storage and relies on theidfield, you'll need to update your code accordingly.Plugin
init()Context Is Now MutableThe context object passed to a plugin's
init()callback is now the same reference used throughout the auth lifecycle.init()can also return arbitrary keys viaRecord<string, unknown>, enabling plugins to inject custom context values that other plugins can access.🐛 Bug Fixes & Improvements
This release includes over 220 bug fixes addressing issues across all areas:
refresh_token_expires_inhandling, callback routing, and token encryption.updateSessionchanges and removed duplicate writes.A lot of refinements to make everything smoother, faster, and more reliable.
👉 Check the full changelog
❤️ Contributors
Thanks to all the contributors for making this release possible!
v1.4.21Compare Source
🐞 Bug Fixes
workspace:*- by @himself65 (4e7cf)View changes on GitHub
v1.4.20Compare Source
🐞 Bug Fixes
optionsalias for backward compatibility - by @himself65 in #8139 (07447)View changes on GitHub
v1.4.19Compare Source
🚀 Features
selectsupport - by @jslno in #7667 (4aae0)signUpOnVerificationflow - by @bytaesu and @himself65 in #7699 (f3080)🐞 Bug Fixes
newRole- by @jslno in #7687 (9312d)getCurrentAdapterfor user lookup to avoid transaction deadlock - by @sakamoto-wk in #7758 (327ee)never[]toUserWithRole[]- by @LovelessCodes in #7701 (3c0c5)userin hooks - by @jslno in #8026 (17407).env.localto dotenv - by @himself65 in #7831 (e804e)getSessionCookie- by @jslno in #8008 (81f50)requiredattr properly - by @jslno in #7996 (c44a8)verifyIdTokensupport for Microsoft Entra ID provider - by @bytaesu in #7795 (80120)urlinstead ofuriin continue and consent endpoints - by @bytaesu in #7811 (fb56f)acceptInvitation- by @Saurav3004, Taesu and @himself65 in #7825 (3f254)deleteVerificationByIdentifierfor secondary-storage cleanup - by @bytaesu in #7790 (6efdc)better-callpeerDeps - by @bytaesu in #7676 (d323b)better-callpeerDeps - by @bytaesu in #7675 (f63bf)stripeCustomerIdon/subscription/cancel/callbackendpoint - by @bytaesu in #8032 (15519)View changes on GitHub
v1.4.18Compare Source
🚀 Features
disableImplicitLinkingto accountLinking - by @Paola3stefania and @himself65 in #7270 (a7740)/forget-password/email-otpas deprecation - by @bytaesu in #7645 (8f333)🐞 Bug Fixes
account_datacookie when session is refreshed - by @bytaesu and @himself65 in #7576 (5d3f7)sendOnSignUpoption - by @bytaesu in #7593 (33619)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 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.