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

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

---

## 🔐 **Security Hardening**

### ✅ **SAML Assertion Audience**
- **Change**: SAML assertions are now validated against the **Audience URI (SP Entity ID)**.
- **Issue**: After upgrading, sign-in may fail with `"SAML assertion audience does not match the SP entity ID"`.
- **Fix**: Set the **Audience** at your identity provider to match the **SP Entity ID** in the connector settings.

### ✅ **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, trusted devices
- **Error for Third-Party Apps**: `403 auth.third_party_application_forbidden`
- **Note**: First-party apps (e.g., Account Center, Console) are unaffected.

---

## 🛠️ **Connectors & Authentication**

### ✅ **SAML Applications**
- **Validation**: Rejects malformed SAML XML (e.g., unescaped `&`, mismatched tags) with `400 application.saml.invalid_saml_request`.
- **Audit Log**: Records format errors under `samlRequestError`.
- **Error Handling**: Returns `400` instead of `500` for unparseable requests (if not requiring signed requests).

### ✅ **OAuth & OIDC**
- **Scope Handling**: Trims leading/trailing spaces in `scope` values.
  - Example: `" offline_access"` → `offline_access`
  - Empty scopes (after trimming) are treated as omitted.
- **Refresh Tokens**: Retain original scope if no scope is provided.

### ✅ **Standard OAuth 2.0 & OIDC**
- **Token Response Fixes**:
  - Accepts `expires_in` as a **string** (e.g., from Criipto).
  - Accepts `scope` as a **JSON array** (e.g., from Twitch), normalizing to space-separated string.

### ✅ **Patreon Connector**
- **Fix**: Patreon v1 API deprecated → now uses **v2 identity endpoint**.
- **Result**: Patreon sign-in restored.

### ✅ **Connector Kit**
- **Performance**: `jsonGuard` and `jsonObjectGuard` now build schema **once**, not per nested value.
- **Benefit**: Faster validation for large JSON payloads.

---

## 📦 **Logto Tunnel (`@logto/tunnel` v0.3.12)**

### ✅ **Static File Serving**
- **Symlinks**: Resolved before serving. Files outside `--experience-path` return **404**.
- **Range Headers**:
  - `Range` end beyond file size → **clamped** to file size.
  - Unsatisfiable range → **416 Range Not Satisfiable**.

---

## 🧪 **Request & Validation Improvements**

### ✅ **Request Errors**
- **Reduced Logging**: When a connector request fails (e.g., timeout), only **error name, code, message** are logged.
- **Removed**: Request bodies, headers, query strings from logs/telemetry/error responses.
- **Server Log**: Still includes request method and URL origin/pathname.

### ✅ **Single-Use Codes & Tokens**
- **Reused Tokens**: Now rejected with appropriate errors:
  - Authorization code → `invalid_grant`
  - Pushed auth request → `invalid_request_uri`
  - One-time token → `one_time_token.token_consumed`
- **Refresh Tokens**: Still allow reuse within their window.

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

---

## 🖥️ **Sign-in Experience & UX**

### ✅ **Older Safari & iOS**
- **Fix**: Sign-in page no longer loads blank on **iOS < 16.4** and **Safari < 16.4**.
- **Now**: Compiled for **iOS 15+** and **Safari 15+**.

### ✅ **Social Sign-in**
- **Unreachable Provider**:
  - Returns `502 connector.social_provider_unreachable` on transport errors (timeout, DNS, etc.).
  - Includes network error code and connector ID.
  - End users see translated message.
- **Declined Authorization**:
  - Returns `401 connector.authorization_failed` with provider’s `error` and `error_description`.
  - Covers `access_denied`, `user_cancelled_authorize`, `user_cancelled_login`.
- **Provider Errors**: Now show actual error messages instead of `{}`.

### ✅ **SAML Applications**
- **Attribute Mapping**: Fixed issue where mapped attributes like `o365role` were sent as literal `{attr…}` instead of actual values.

---

## 🧩 **Console & Account Center**

### ✅ **Application Access Control**
- **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**
- **Fix**: Code examples now use **consistent client name**, resolving `Cannot find 'client' in scope` in Xcode.
- **Thanks**: @timokoethe (#9788)

---

## 🧰 **Management API**

### ✅ **Custom Client Metadata**
- **Validation**: Rejects unknown keys under `customClientMetadata` with `400 guard.invalid_input`.
- **Response**: Includes the invalid key in `data`.
- **Note**: Existing apps unaffected.

### ✅ **Pagination Links**
- **Fix**: Repeated query parameters (e.g., `?types=SPA&types=Traditional`) are now preserved in `first`, `prev`, `next`, `last` links (not joined into comma-separated values).

### ✅ **One-Time Token Count**
- **Fix**: `Total-Number` header now counts **only matching tokens** when filtering by `email` or `status`.

### ✅ **Manual Unlock**
- **Fix**: Clears **active security verification lockouts longer than 60 minutes**.
- **Docs Update**: Manual unlock dialog and API docs now mention **user IDs** and **security verification lockouts**.

---

## 🧱 **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 (minimums: 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.
- **Guide**: [Upgrade Guide](https://docs.logto.io/logto-oss/upgrading-oss-version)

### ✅ **Database Connection Retries**
- **Improved Resilience**:
  - Core now retries on DNS failures (`ENOTFOUND`, `EAI_AGAIN`) at startup.
  - CLI commands (`db seed`, `db alteration deploy`) now retry transient errors (including DNS).

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

---

## 👥 **Contributors**

Huge thanks to the community for contributing to this release:

| Contributor | Contributions |
|-----------|---------------|
| [@nicolaj0](https://github.com/nicolaj0) | Webhook `deliveryId`, `hasPassword` for org members, org filter by JIT domain, `customClientMetadata` validation, unreachable social errors, declined authorization errors, DB connection retries, connector request errors |
| [@RaphaelFakhri](https://github.com/RaphaelFakhri) | Repeated query params in pagination links (first contribution) |
| [@mvanhorn](https://github.com/mvanhorn) | `ADMIN_ENDPOINT` mismatch warning |
| [@timokoethe](https://github.com/timokoethe) | Consistent client name in Swift guide |

---

## 🔗 **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** | Ensure you run `logto db alteration deploy` after upgrading. |
| 🔐 **SAML Fix** | Update identity provider audience to match SP Entity ID. |
| 🛠️ **API Access** | Use **first-party apps** for Account API operations. |
| 🧪 **Testing** | Test SAML, social sign-in, and OAuth flows post-upgrade. |
| 📦 **Tunnel** | If using `@logto/tunnel`, ensure static file serving is secure. |
| 🧰 **Self-Hosted** | Check `ADMIN_ENDPOINT`, DNS, and Node.js version. |

---

This release focuses on **security**, **stability**, **performance**, and **developer experience**, with notable improvements in **SAML**, **OAuth**, **social connectors**, and **self-hosting resilience**.