Skip to content

logto

v1.40.0 Breaking

This release includes 1 breaking change for platform teams planning a safe upgrade.

✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

authentication authorization email identity jwt login
+14 more
logto mfa oauth2 openid-connect password passwordless rbac saml signup sms social-login sso totp typescript

Affected surfaces

auth breaking_upgrade

ReleasePort's take

Moderate signal
editorial:auto 5d

Logto v1.40.0 adds an audit‑logs time‑range picker to the Console and API.

Why it matters: Enables targeted log retrieval for developers, SREs, and security engineers; no mandatory migration required.

Summary

AI summary

Broad release touches Connectors, Highlights, Account Center, and Audit logs time-range picker.

Changes in this release

Breaking High

Database migration required after upgrade; run alteration command before starting new version.

Database migration required after upgrade; run alteration command before starting new version.

Source: llm_adapter@2026-05-29

Confidence: high

Feature Medium

OpenAPI schemas now declare `additionalProperties: true` for arbitrary JSON objects.

OpenAPI schemas now declare `additionalProperties: true` for arbitrary JSON objects.

Source: llm_adapter@2026-05-29

Confidence: high

Feature Medium

New `--dapc` flag disables admin pwned‑password check for air‑gapped deployments.

New `--dapc` flag disables admin pwned‑password check for air‑gapped deployments.

Source: llm_adapter@2026-05-29

Confidence: high

Feature Medium

Audit logs time-range picker added to Console and API.

Audit logs time-range picker added to Console and API.

Source: llm_adapter@2026-05-29

Confidence: low

Feature Medium

Organization.Membership.Updated webhook now includes delta fields for added/removed users and applications.

Organization.Membership.Updated webhook now includes delta fields for added/removed users and applications.

Source: llm_adapter@2026-05-29

Confidence: low

Feature Medium

GET /api/my-account/sessions now returns `isCurrent` boolean on each session entry.

GET /api/my-account/sessions now returns `isCurrent` boolean on each session entry.

Source: llm_adapter@2026-05-29

Confidence: low

Feature Low

Console audit logs page now includes a time-range picker with presets and custom range.

Console audit logs page now includes a time-range picker with presets and custom range.

Source: granite4.1:30b@2026-05-29-audit

Confidence: low

Feature Low

API endpoints GET /api/logs and GET /api/hooks/{id}/recent-logs support start_time, end_time query parameters (unix ms).

API endpoints GET /api/logs and GET /api/hooks/{id}/recent-logs support start_time, end_time query parameters (unix ms).

Source: granite4.1:30b@2026-05-29-audit

Confidence: low

Feature Low

API supports enableCap=true parameter to cap log results at ~10,000 rows and add Total-Number-Is-Capped header.

API supports enableCap=true parameter to cap log results at ~10,000 rows and add Total-Number-Is-Capped header.

Source: granite4.1:30b@2026-05-29-audit

Confidence: low

Feature Low

PUT /organizations/:id/users now uses delta-based replaceWithDelta() to write only changed rows, preserving existing roles.

PUT /organizations/:id/users now uses delta-based replaceWithDelta() to write only changed rows, preserving existing roles.

Source: granite4.1:30b@2026-05-29-audit

Confidence: low

Performance Medium

New secondary indexes and query rewrites improve large organization membership listing speed.

New secondary indexes and query rewrites improve large organization membership listing speed.

Source: llm_adapter@2026-05-29

Confidence: low

Performance Low

GET /organizations/:id/users query rewritten with LATERAL subquery to prune users before role lookups.

GET /organizations/:id/users query rewritten with LATERAL subquery to prune users before role lookups.

Source: granite4.1:30b@2026-05-29-audit

Confidence: low

Performance Low

New secondary indexes organization_user_relations and organization_role_user_relations added for faster reverse lookups and per-user role queries.

New secondary indexes organization_user_relations and organization_role_user_relations added for faster reverse lookups and per-user role queries.

Source: granite4.1:30b@2026-05-29-audit

Confidence: low

Bugfix Medium

Terms agreement now prompts when switching from sign‑in to registration under `ManualRegistrationOnly` policy.

Terms agreement now prompts when switching from sign‑in to registration under `ManualRegistrationOnly` policy.

Source: llm_adapter@2026-05-29

Confidence: high

Bugfix Medium

Initial password setup allows users without email/phone to set a password via Account API.

Initial password setup allows users without email/phone to set a password via Account API.

Source: llm_adapter@2026-05-29

Confidence: high

Bugfix Medium

Silent re‑authentication now uses `prompt=none` before falling back to login screen.

Silent re‑authentication now uses `prompt=none` before falling back to login screen.

Source: llm_adapter@2026-05-29

Confidence: high

Full changelog

Highlights

  • Audit logs time-range picker: Scope the audit log to a bounded time window (preset windows plus a custom range), backed by a server-side count cap that keeps large-volume tenants responsive.
  • Organization membership webhook deltas: Organization.Membership.Updated now reports exactly which users and applications were added or removed.
  • Faster organizations at scale: New secondary indexes and query rewrites speed up membership listing and per-user role lookups on large tenants.
  • Air-gapped & self-hosted friendliness: A new --dapc install/seed flag and DB-direct admin signing keys remove outbound-network and DNS friction for OSS deployments.
  • New connectors: MailJunky email, SMSBao SMS, and the Aliyun SMS authentication service connector, plus Aliyun Direct Mail regions and richer WeCom profiles.

New features & enhancements

Audit logs time-range picker

  • The Console audit logs page now ships a time-range picker with a default window of the last 7 days. Presets cover Last 1 hour / Last 24 hours / Last 7 days / Last 30 days, plus a custom date range.
  • The API gains start_time and end_time query parameters on GET /api/logs and GET /api/hooks/{id}/recent-logs (exclusive bounds, unix milliseconds). On GET /api/hooks/{id}/recent-logs, supplying either bound replaces the default 24-hour lower bound.
  • A new enableCap=true query parameter on GET /api/logs and GET /api/hooks/{id}/recent-logs short-circuits the count query at ~10,000 rows to reduce statement_timeout risk on very large log volumes. Capped responses return a Total-Number-Is-Capped: true header, and the Console renders a Prev/Next layout in that case. Default behavior (without the param) is unchanged.

Organization membership webhook deltas

  • The Organization.Membership.Updated webhook payload is enriched with explicit delta fields: addedUserIds / removedUserIds and addedApplicationIds / removedApplicationIds across the user and application membership endpoints, plus addedUserIds on invitation accept and just-in-time provisioning (email-domain JIT and enterprise SSO JIT).
  • Empty deltas are omitted; each delta array is capped at 5000 entries (reconcile bulk changes via GET /organizations/:id/users or .../applications). This is an additive, non-breaking change — see the webhook reference.

Account API: sessions isCurrent

  • GET /api/my-account/sessions now returns isCurrent: boolean on every entry, so session-management UIs can mark the "This device" entry and avoid revoking the caller's own session. The admin user-sessions endpoints are unchanged.

Performance for large organizations

  • GET /organizations/:id/users is rewritten to aggregate roles via a LATERAL subquery, so LIMIT prunes the user set before role lookups instead of materializing the full members × roles join on every page.
  • New secondary indexes speed up reverse lookups: organization_user_relations (tenant_id, user_id) (hit on every sign-in and the membership middleware) and organization_role_user_relations (tenant_id, organization_id, user_id) (hit by getUserScopes and per-user role joins).
  • PUT /organizations/:id/users now uses a new delta-based replaceWithDelta() query that writes only the rows that actually changed, preserving role assignments for members whose membership survives the update.

OpenAPI: accurate arbitrary-object types

  • Arbitrary JSON object schemas now declare additionalProperties: true in the OpenAPI document, so generated TypeScript clients (e.g. @logto/api) type fields such as customData as { [key: string]: unknown } instead of Record<string, never>.

Bug fixes & stability

Experience

  • Terms agreement on sign-in-to-registration: When the agreement policy is ManualRegistrationOnly, signing in with an unregistered email or phone and then confirming "create a new account" now prompts the terms agreement before the account is created, matching the dedicated registration and social/SSO flows.

Account Center

  • Initial password setup: Users with no password, no primary email, and no primary phone can now set their initial password without a verification record through the Account API.
  • Silent re-authentication: On a user-info error (e.g. a stale access token after switching users in the same browser), Account Center re-authenticates with prompt=none instead of forcing the login screen, falling back to prompt=login only when no valid session exists.
  • Expired sessions: Expired Account Center sessions now redirect cleanly without flashing the manual sign-in error.
  • Social linking callback: The social linking callback is rendered through React Router so connectorId is read correctly, fixing a spurious "social sign-in method is not enabled" error.
  • 2-step verification label: Clarified the Account Center 2-step verification toggle label.

Internationalization

  • Corrected the Chinese translation of "Passkey" in the MFA experience phrases.

Self-hosting & OSS notes

  • Air-gapped admin setup (--dapc): The install and db seed commands accept a new --dapc flag (alias --disable-admin-pwned-password-check). It seeds the admin password policy with the Have I Been Pwned breach check disabled, so the first admin sign-up no longer hangs when api.pwnedpasswords.com is unreachable.
  • Admin signing keys read from the database: OSS deployments now read the admin tenant signing keys directly from the database, removing the extra host/DNS mappings that previously let the container fetch its own admin tenant OIDC configuration through the external endpoint.
  • Database migration required: This release ships schema alterations (the new organization-relation indexes and additional internal columns). After upgrading, run the database alteration command (npm run alteration deploy in the @logto/cli/core image, or logto db alteration deploy) before starting the new version. See the upgrade guide.

Connectors

  • New — MailJunky email connector: Send transactional auth emails via the MailJunky send API.
  • New — SMSBao SMS connector: Domestic SMS verification flows via SMSBao.
  • New — Aliyun SMS authentication service connector: Adds the Aliyun SMS authentication (MAS) service.
  • Aliyun Direct Mail regions: The Aliyun DM connector now supports configuring the Direct Mail region.
  • WeCom: Fetches richer user profile details via additional API calls.
  • SMTP: The auth config may now omit user and pass, so relays that authorize by source (e.g. IP/VLAN) can be configured without forging credentials.
  • Connector Kit: Tightened email branding URL detection to avoid false positives on dotted abbreviations.

Contributors

Huge thanks to the community members whose work shipped in this release:

For the complete list of changes, see the full changelog.

Breaking Changes

  • Database migration required; run `npm run alteration deploy` (or `logto db alteration deploy`) before starting v1.40.0.

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track logto

Get notified when new releases ship.

Sign up free

About logto

Authentication and authorization infrastructure for SaaS and AI apps, built on OIDC and OAuth 2.1 with multi-tenancy, SSO, and RBAC.

All releases →

Beta — feedback welcome: [email protected]