Headless cloud-native authentication and identity management written in Go. Scales to a billion+ users. Replace Homegrown, Auth0, Okta, Firebase with better UX and DX. Passkeys, Social Sign In, OIDC, Magic Link, Multi-Factor Auth, SMS, SAML, TOTP, and more. Runs everywhere, runs best on Ory Network.
This release introduces passwordless authentication via SMS, expanded passkey and WebAuthn support, new SAML and OIDC features, extended event emission for observability, and significant database and API optimizations. Ory Kratos v25.4 also prepares for compatibility with the new Ory Elements v1.0 by introducing improvements to self-service flows.
Operators gain better migration tooling, performance improvements, and more robust hooks.
Ory has moved to a new versioning scheme. Read about our new version scheme. Interested in self-hosting Ory with support, SLAs, and advanced features (b2b sso, organization login, FedCM, multi-tenancy …)? Check out our offerings.
Highlights
Passwordless and recovery improvements
Added passwordless login and registration via SMS.
Recovery codes can now be delivered by SMS.
Significantly improved recovery flows that now work with any and multiple address types (email or SMS).
Added resend node for verification after registration.
Passkeys and other credentials
Support for Android WebAuthn origins, enabling secure passkeys on Android.
Emission of oryWebAuthnInitialized event when WebAuthn is ready in the browser.
Graceful handling of failing password rehashing during login, improving reliability for long passwords.
Added support for importing SAML credentials (Enterprise/Network only).
Added support for Line v2.1 OIDC provider.
Microsoft OIDC now uses oid instead of sub for stable identifiers.
Added caching of OIDC providers to reduce calls to discovery endpoints.
New policy callbacks for customizing OIDC credential linking.
Added more extension points to the registry.
User flow enhancements
require_verified_address now automatically starts a verification flow instead of failing.
Captcha improvements: first-step captcha groups and domain allowlists (Ory Enterprise License / Ory Network only).
Improved error reporting and handling across login, registration, and linking flows (Ory Enterprise License / Ory Network only).
OIDC signup and account linking flows more robust, including better handling of login challenges in SPAs.
alreadyAuthenticated cases in native login/registration flows now handled correctly.
Verification hooks improved: correct status handling in recovery hooks and support in settings flows.
Auto-linking and identifier updates fixed to ensure identities remain consistent.
Division UI nodes added for dynamic script hooks.
Console UI now supports multiple identity schemas.
Admin API now allows deleting password credentials if not the last factor.
Events and observability
New events: LoginStarted, RegistrationStarted.
New courier events: CourierMessageAbandoned, CourierMessageDispatched.
Events now emitted on Jsonnet mapping failures (OIDC claims, JWT templating).
Admin recovery code events are logged.
More attributes added to webhook events for better debugging.
Extended tracing in settings, courier, and credential linking flows.
Operational and performance improvements
Optimized secondary indices for self-service, session, and identity tables.
Removed unused indices and improved query plans for CockroachDB.
Reduced duplicate queries in settings and credential flows.
Faster lookups for credential types and session handling.
Added index hints for CockroachDB identity credential deletion.
Improved handling of identity imports with reduced DB load.
Recovery and OTP code submit count mechanism redesigned to prevent brute-forcing.
New kratos migrate sql up|down|status commands replace old migration CLI commands.
OIDC sessions now loaded only once when middleware is used.
Courier improved with HTML email support and more reliable tracing.
Added explicit config flag for secure cookies.
External ID support for identities via API and webhooks.
New endpoint to tokenize JWTs using webhooks.
Improved domain telemetry for OSS deployments.
Autoconfiguration for kratos-changefeed (Ory Enterprise License / Ory Network only).
High-performance SQL connection pool with tracing and metrics (Ory Enterprise License / Ory Network only).
Developer and extension improvements
More extension points available in registry and OIDC flows.
Jsonnet body templating enabled for password migration hook.
New attributes available for Login and Registration events.
Webhook configuration handling refactored and extended.
New division node attributes for UI extensibility.
Added email domain matcher for flows.
Added external IDs and webhook configurability.
Console support for choosing identity schema during registration/login (Enterprise).
Documentation and tooling
Improved docs for OAS verification, Facebook Graph API, and OIDC subject sources.
Clarified error messages in security-related contexts.
Better migration error handling and improved messages for operators.
Added help text for new migration commands.
CI/CD stability fixes, improved code coverage configuration, and dependency updates.
Breaking changes
Sessions API: The x-total-count header has been removed from GET /admin/sessions.
Commit: e24f993ea
Account linking: Failed OIDC account linking flows now return HTTP 400 instead of 200 OK.
Commit: ed4fba3ef
Verification flow: The show_verification_ui element is only included if the hook is explicitly configured.
Commit: 5b00fe15d
OIDC registration: Failing fields are now placed in the default node group instead of oidc. Legacy behavior can be restored with feature_flags.legacy_oidc_registration_node_group=true.
Commit: dc8b32e00
Known regressions
Unfortunately, this release contains a breaking change. Most applications will be unaffected by this issue. Read more about it here: https://github.com/ory/kratos/pull/4499
Auto-generated release notes
The require_verified_address hook no longer returns a
plain error. Previously, users had to manually start the verification
flow, which caused a poor experience. Now, Ory Kratos automatically
creates a verification flow and redirects the user using continue_with
or an HTTP redirect. The verification flow starts with the first
verified address found for the user. This aligns the behavior of
require_verified_address with using the verification and
show_verification_ui hook combination for login.
Going forward, the node group of fields that are
failing validation during oidc sign up are default and no longer
oidc. For now, you can get the legacy behavior back by turning on
feature_flags.legacy_oidc_registration_node_group=true.
Before this change, show_verification_ui would
always be included in continue_with for the registration flow when
verification was enabled. After this change, show_verification_ui is
only included when the show_verification_ui post-registration hook is
defined.
Account linking incorrectly returned a 200 OK status
code even though the login flow was not completed successfully. Going
forward, the correct 400 OK status code will be sent when using the API
flow or Accept: application/json.
This patch changes the behavior of configuration item foo to do bar. To keep the existing
behavior please do baz.
Bug Fixes
Accept login challenge in session_issuer on SPA flows (#4288) (e13687a)
Accept login_challenge in SPA verification flows (#4284) (7ca3b6b)
Account linking should only happen after 2fa when required (#4174) (8e29b68)
Enable b2b_sso hook in more places (#4168) (0c48ad1):
fix: allow b2b_sso hook in more places
Ensure make quickstart-dev works without options (#4401) (327c5a4):
make quickstart-dev uses the make variable QUICKSTART_OPTIONS which
is set to "" by default. This will result in two double quotes ("")
in the final shell command e.g. docker-compose "" up when the variable
is not set on the make command line, which fails at the shell level. The
fix is to leave the variable empty by default. No semantic changes.
Ensure authentication method is added to session after linking OIDC provider (5cae1f7):
Ensure context is not canceled during password hashing (#4364) (e9c6a18):
Especially during large imports of plaintext passwords there can be a
lot of useless hashing, even after the request timed out or got
canceled.
Ensure that auto_link_credentials markers are being properly overwritten (#4320) (a4fd8ac), closes #1234#1234:
Return return_to code if already authenticated (#4286) (119841a):
This fixes a bug in native OIDC login and registration flows, where the
user already has a session in the browser the flow is continued with
(usually a web view, but depending on the platform it already has a
session cookie set). In the callback, we now correctly handle the case
in alreadyAuthenticated to return the session token exchange code.
Show code email in most error states (#4338) (905d1e5)
Show_verification_ui in continue_with only if configured (#4402) (5b00fe1):
This patch modifies the self-service registration flow so that the
show_verification_ui continue_with element is only returned when the
relevant post‑registration hook is defined (or when legacy behavior is
enabled via configuration). It also adds a new attribute key and
internal context handling for the registration flow and updates related
tests and API signatures.
Add explicit config flag for secure cookies (#4180) (2aabe12):
Adds a new config flag for session and all other cookies. Falls back to the previous behavior of using the dev mode to decide if the cookie should be secure or not.
Add LoginStarted and RegistrationStarted events along their
required attributes
Sort all event attributes alphabetically
Emit these events when a new login/registration flow is created,
after basic validation passed
It is unclear yet how many of these events will be emitted, as such it
is suggested that in a first phase, they remain internal and are not yet
sent externally to avoid surprises (note: sometimes, these events can be
emitted without user action such as simply visiting/being redirected to
the sign-in page, etc)
Division nodes may be used to hook dynamic scripts and are not actively used in the Ory Kratos open source.
Add new endpoint to tokenize JWT with a webhook (f7fa792):
Add oid as subject source for microsoft (#4171) (77beb4d), closes #4170:
In the case of Microsoft, using sub as an identifier can lead to problems. Because the use of OIDC at Microsoft is based on an app registration, the content of sub changes with every new app registration. Sub is therefore not uniquely related to the user. It is therefore not possible to transfer users from one app registration to another without further problems.
https://learn.microsoft.com/en-us/entra/identity-platform/id-token-claims-reference#payload-claims
With the use of oid it is possible to identify a user by a unique id.
The admin API did not allow to delete passwords at all. The restriction is now lifted to only block deletion of the first-factor credential if it is the last one.
Allow extra go migrations in persister (#4183) (7bec935)
Allow listing identities by organization ID (#4115) (b4c453b)
Allow setting the org ID on creation (#4306) (bccd2fb)
Emit event on Jsonnet claims mapping error (#4394) (8caebdb):
We now emit an event containing the Jsonnet input and output in
anonymized form when mapping the claims in the OIDC flow fails.
Emit events on jsonnet failure when templating a jwt (#4409) (959ded5):
Fix typo: parital -> partial
Document with comments why an event is not emitted or not documented
Emit JsonnetMappingFailed events on jsonnet failure when templating
a jwt (see https://www.ory.sh/docs/identities/session-to-jwt-cors).
After review it seems we otherwise always emit events in all the right
places, except in this very case. Tested end-to-end manually with the
UI.
Emit oryWebAuthnInitialized event once webauthn is initialized (b4485f4):
Enable JSONNet templating for password migration hook (#4390) (b162897):
This enables JSONNet body templating for the password migration hook.
There is also a significant refactoring of some internals around webhook config handling.
Gracefully handle failing password rehashing during login (#4235) (3905787):
This fixes an issue where we would successfully import long passwords (>72 chars), but fail when the user attempts to login with the correct password because we can't rehash it. In this case, we simply issue a warning to the logs, keep the old hash intact, and continue logging in the user.
Optimize identity-related secondary indices (#4182) (53874c1)
Passwordless SMS and expiry notice in code / link templates (#4104) (462cea9):
This feature allows Ory Kratos to use the SMS gateway for login and registration with code via SMS.
Additionally, the default email and sms templates have been updated. We now also expose ExpiresInMinutes / expires_in_minutes in the templates, making it easier to remind the user how long the code or link is valid for.
Remove duplicate queries during settings flow and use better index hint for credentials lookup (#4193) (c33965e):
This patch reduces duplicate GetIdentity queries as part of submitting the settings flow, and improves an index to significantly reduce credential lookup.
For better debugging, more tracing ha been added to the settings module.
Return field name in generated node text label (8c7a3dc):
Rework the OTP code submit count mechanism (#4251) (4ca4d79):
feat: rework the OTP code submit count mechanism
Unlike what the previous comment suggested, incrementing and checking the submit count inside the
database transaction is not actually optimal peformance- or security-wise.
We now check atomically increment and check the submit count as the first part of the operation,
and abort as early as possible if we detect brute-forcing. This prevents a situation where the
check works only on certain transaction isolation levels.
chore: bump dependencies
Support android webauthn origins (#4155) (a82d288):
This patch adds the ability to verify Android APK origins used during WebAuthn/Passkey exchange.
Upgrades go-webauthn and includes fixes for Go 1.23 and workarounds for Swagger.
Support CRUD OIDC providers through the onboarding portal API (664fd1a):
Support importing more credentials (#4361) (9a6dadf):
Adds support to import SAML credentials. SAML connections are only
available in Ory Enterprise License / Ory Network.
Update only necessary database columns in UpdateVerifiableAddress (#4292) (168a3f6):
This is an optimization to reduce database load.
When we specify exactly which columns changed, we should be able to
elide updates to the identity_verifiable_addresses_status_via_uq_idx (nid,via,value) index. Updating that index requires contacting remote
regions.
Also fixed a bug where we did not set the verified_at timestamp
correctly sometimes.
Use one transaction for /admin/recovery/code (#4225) (3e87e0c)