The provided content is a **release notes document** for **Logto**, a developer-focused identity platform, detailing changes in version **v1.46.0**. It includes updates across multiple areas such as **security hardening**, **API changes**, **bug fixes**, **connector improvements**, and **OSS/self-hosting considerations**.

Below is a **structured summary** of the key points, organized by category for clarity and ease of understanding:

---

## 🔐 **Security Hardening & API Changes**

### ✅ **SAML Assertion Audience**
- **Change**: SAML assertions are now validated against the **Audience URI (SP Entity ID)**.
- **Impact**: If SAML sign-in fails with `"SAML assertion audience does not match the SP entity ID"`, update your **Identity Provider (IdP)** to set the **Audience** to match the connector’s **SP Entity ID**.
- **Note**: This change was introduced after an upgrade.

### 🔐 **Account API & Third-Party Apps**
- **New Requirement**: All Account API operations now require a **first-party application**.
- **Affected Endpoints**:
  - `GET /api/my-account/identities/:target/access-token`
  - `GET /api/my-account/sso-identities/:connectorId/access-token`
  - `PUT /api/my-account/identities/:target/access-token`
  - Reading backup codes, sessions, grants, and trusted devices.
- **Third-Party Apps**: Now receive `403 auth.third_party_application_forbidden`.
- **First-Party Apps (e.g., Account Center, Console)**: Unaffected.

---

## 🔄 **Connector & Authentication Improvements**

### 🧩 **Connector Request Errors**
- **Enhanced Logging**: When a connector request fails (e.g., timeout), the error is now reduced to:
  - Name
  - Code
  - Message
- **Removed**: Request bodies, headers, and query strings from logs, telemetry, audit logs, and responses.
- **Retained**: Request method and URL origin/pathname in server logs.

### 🔐 **Single-Use Codes & Tokens**
- **One-Time Use**: Authorization codes, device codes, pushed auth requests, and one-time tokens are now **accepted only once**.
- **Reused Token Errors**:
  - `invalid_grant` – for authorization codes
  - `invalid_request_uri` – for pushed authorization requests
  - `one_time_token.token_consumed` – for one-time tokens
- **Exception**: Refresh tokens still allow reuse within their window.

### 🧾 **SAML Applications**
- **Validation**: `GET` and `POST /api/saml/:id/authn` now reject malformed SAML XML (e.g., unescaped `&`, mismatched tags) with `400 application.saml.invalid_saml_request`.
- **Audit Log**: Format errors are recorded under `samlRequestError`.
- **Error Handling**: Requests that cannot be decoded/parsed now return `400` instead of `500` if signed authentication is not required.

---

## 🛠️ **Logto Tunnel (v0.3.12)**
- **Static File Serving**:
  - Symlinks are resolved; files outside `--experience-path` return `404`.
  - Symlinks pointing inside the path and symlinked paths themselves still work.
- **Range Headers**:
  - `Range` end beyond file size is clamped to file size.
  - Unsatisfiable ranges return `416 Range Not Satisfiable`.

---

## 🧪 **Request Validation**
- **Validation Limits**:
  - `guard.invalid_input` now lists **only the first 100 validation issues**.
  - `POST /callback/:connectorId` and `POST /account/callback/social/:connectorId` stop validating after **100 invalid fields**.
- **Error Response**: Unchanged.

---

## 🐞 **Bug Fixes & Stability**

### 📱 **Sign-in Experience**
- **Safari/iOS Compatibility**: Fixed blank sign-in page on **iOS < 16.4** and **Safari < 16.4**.
- **Fix**: Now compiled for **iOS 15+** and **Safari 15+**.

### 🌐 **Social Sign-In**
- **Unreachable Provider**:
  - Now returns `502 connector.social_provider_unreachable` instead of generic `500`.
  - Includes network error code and connector ID.
  - End users see translated messages.
- **Declined Authorization**:
  - Now returns `401 connector.authorization_failed` with provider-specific `error` and `error_description`.
  - Covers cases like `access_denied`, `user_cancelled_authorize`, `user_cancelled_login`.
- **Provider Error Messages**: Now show actual provider messages instead of `{}`.

### 🔐 **OAuth & OIDC**
- **Space-Padded Scopes**:
  - Clients like OpenAI Codex sending scopes with leading spaces (e.g., `" offline_access"`) are now accepted.
  - Leading/trailing/repeated spaces are ignored.
  - A scope of only spaces is treated as **omitted**.

---

## 🧩 **Management API**

### 📦 **Custom Client Metadata**
- **Validation**: `POST /api/applications` and `PATCH /api/applications/:id` now reject unknown keys under `customClientMetadata` with `400 guard.invalid_input`.
- **Error Details**: Lists the invalid key in the `data` field.
- **Note**: Existing apps are unaffected.

### 🔗 **Pagination Links**
- **Fix**: `first`, `prev`, `next`, `last` links now preserve **all values** of repeated query parameters (e.g., `?types=SPA&types=Traditional`) instead of joining them into a comma-separated string.

### 🔢 **One-Time Token Count**
- **Filtering**: When filtering by `email` or `status`, the `Total-Number` header now counts **only matching tokens**.

### 🔓 **Manual Unlock**
- **Fix**: Manually unlocking a user now also clears **security verification lockouts longer than 60 minutes**.
- **Documentation**: Updated to mention **user IDs** and **security verification lockouts**.

---

## 🧩 **SAML Applications**
- **Attribute Placeholders**: Mapped attributes like `o365role` or `tenant1id` now return the **actual user value** instead of the literal `{attr...}` placeholder.

---

## 🖥️ **Console & Account Center**

### 🧩 **Application Access Control**
- **Fix**: Organization selector now **filters results** when searching.

### 🧩 **Role Permissions**
- **UI Improvements**:
  - Full API resource names shown.
  - Truncated names have **tooltips**.

### 🎨 **Account Center Branding**
- **Fix**: No longer shows "Powered by Logto" during loading when branding is hidden.

---

## 📚 **Documentation**
- **Swift Integration Guide**:
  - Fixed **client name consistency** in code examples.
  - Resolves `Cannot find 'client' in scope` in Xcode.
  - Thanks to [@timokoethe](https://github.com/timokoethe).

---

## 🧩 **Connectors**

### 🔄 **Standard OAuth 2.0 & OIDC**
- **String `expires_in`**: Now accepted (e.g., from Criipto).
- **JSON Array `scope`**: Now accepted (e.g., from Twitch), normalized to space-delimited string.

### 🟡 **Patreon**
- **API v1 Removed**: Connector now uses **Patreon API v2 identity endpoint**.
- **Result**: Patreon sign-in restored.

### 🔧 **Connector Kit**
- **Performance**: `jsonGuard` and `jsonObjectGuard` now build recursive JSON schema **once**, not per nested value.
- **Result**: Faster validation of large JSON payloads (results unchanged).

---

## 🧰 **Self-Hosting & OSS Notes**

### ⚠️ **Review Before Upgrading**
- Check:
  - OAuth 2.0 & Azure AD email sync
  - SAML assertion audience
  - Third-party Account API changes

### 🐍 **Node.js 26**
- **Docker Image**: Now runs on **Node.js 26**.
- **Supported Versions**: 22, 24, 26.
- **Minimum Versions**:
  - 22.23.4
  - 24.22.1
  - 26.12.1
- **Security**: Includes **October 2026** Node.js security fixes.

### 🗄️ **Database Migration Required**
- **Schema Changes**:
  - New columns for SAML static attributes.
  - New sign-in experience and Account Center settings.
- **Action**: Run `npm run alteration deploy` (or `logto db alteration deploy`) **before** starting the new version.
- **Reference**: [Upgrade Guide](https://docs.logto.io/logto-oss/upgrading-oss-version)

### 🔄 **Database Connection Retries**
- **Startup**: Now retries on DNS failures (`ENOTFOUND`, `EAI_AGAIN`) instead of exiting.
- **CLI Commands**: `db seed`, `db alteration deploy` now retry transient errors (including DNS).

### ⚠️ **Admin Endpoint Warning**
- **New Log**: Warns once when a `/console` request reaches the default tenant due to **mismatched admin endpoint**.
- **Action**: Check **Console URL** and `ADMIN_ENDPOINT`.

---

## 👏 **Contributors**
Huge thanks to the community for their contributions:

| Contributor | Contributions |
|-----------|---------------|
| [@nicolaj0](https://github.com/nicolaj0) | Webhook `deliveryId`, `hasPassword`, organization filter, `customClientMetadata` validation, social provider errors, DNS retries, connector request errors |
| [@RaphaelFakhri](https://github.com/RaphaelFakhri) | Repeated query parameters in pagination links (first contribution) |
| [@mvanhorn](https://github.com/mvanhorn) | `ADMIN_ENDPOINT` mismatch warning |
| [@timokoethe](https://github.com/timokoethe) | Swift integration guide consistency |

---

## 🔗 **Full Changelog**
- [v1.45.0 → v1.46.0](https://github.com/logto-io/logto/compare/v1.45.0...v1.46.0)

---

## ✅ **Summary of Key Actions for Users**
| Action | Description |
|------|-------------|
| 🔧 **Upgrade** | Run `logto db alteration deploy` after upgrading. |
| 🔐 **SAML Fix** | Update IdP audience to match SP Entity ID. |
| 🛠️ **API Migration** | Use **first-party apps** for Account API calls. |
| 🧩 **Connectors** | Patreon and OAuth 2.0/ OIDC connectors now more robust. |
| 🧰 **Self-Hosted** | Ensure Node.js 26+ and database migration are done. |

---

This release focuses on **security**, **stability**, **compatibility**, and **developer experience**, with notable improvements in **error handling**, **logging**, and **API access control**.