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**, **connectors**, **APIs**, **bug fixes**, and **OSS (Open Source Software) improvements**.

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

---

## 🔐 **Security Hardening**

### 1. **SAML Assertion Audience**
- **Change**: SAML assertions are now validated against the **Audience URI (SP Entity ID)**.
- **Impact**: After upgrading, if SAML sign-in fails with `"SAML assertion audience does not match the SP entity ID"`, you must:
  - Set the **Audience** at your identity provider (IdP) to match the **SP Entity ID** in the connector settings.
- **Purpose**: Enhances security by ensuring SAML assertions are only accepted for intended services.

### 2. **Account API & Third-Party Apps**
- **Change**: 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.
- **Error for Third-Party Apps**: `403 auth.third_party_application_forbidden`
- **Note**: First-party apps (e.g., Account Center, Console) are unaffected.
- **Action Required**: If your integration retrieves stored provider tokens, switch to a **first-party app**.

### 3. **Connector Request Errors**
- **Change**: Sensitive data (request bodies, headers, query strings) is **no longer logged or exposed** in error responses.
- **Only**: Error name, code, message, and request method/URL are logged.
- **Purpose**: Improves security and reduces log clutter.

### 4. **Single-Use Codes and Tokens**
- **Change**: Authorization codes, device codes, pushed auth requests, and one-time tokens are now **single-use only**.
- **Reused Token Behavior**:
  - `invalid_grant` → for authorization codes
  - `invalid_request_uri` → for pushed auth requests
  - `one_time_token.token_consumed` → for one-time tokens
- **Exception**: Refresh tokens still allow reuse within their window.

### 5. **SAML Applications**
- **Change**: Malformed SAML XML (e.g., unescaped `&`, mismatched tags) now returns `400 application.saml.invalid_saml_request`.
- **Audit Log**: Includes `samlRequestError` field for format issues.
- **Improved Error Handling**: Replaces 500 errors with 400 for parsing failures (unless signed requests are required).

---

## 🛠️ **Connectors & Integrations**

### 1. **Standard OAuth 2.0 & OIDC**
- **Fixes**:
  - Accepts `expires_in` as a **string** (e.g., from Criipto).
  - Accepts `scope` as a **JSON array** (e.g., from Twitch), normalizing to space-delimited string.
- **Impact**: Prevents invalid response errors and improves compatibility.

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

### 3. **Connector Kit**
- **Optimization**: `jsonGuard` and `jsonObjectGuard` now build schema **once**, improving performance for large JSON payloads.
- **Result**: Faster validation without changing behavior.

---

## 🧩 **User Experience & Console**

### 1. **Sign-in Experience**
- **Fix**: Sign-in page no longer loads blank on **older Safari/iOS (pre-16.4)**.
- **Now**: Compiled for **iOS 15+ and Safari 15+**.

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

### 3. **OAuth & OIDC**
- **Fix**: Trims leading/trailing spaces in `scope` values.
- **Example**: `" offline_access"` → treated as `offline_access`.
- **Impact**: Prevents `invalid_scope` errors (e.g., OpenAI Codex).

### 4. **Console & Account Center**
- **Application Access Control**: Organization selector now filters results during search.
- **Role Permissions**:
  - Full API resource names shown.
  - Truncated names have tooltips.
- **Account Center Branding**:
  - "Powered by Logto" no longer appears during loading when branding is hidden.

---

## 📦 **API & Management**

### 1. **Management API**
- **`customClientMetadata`**:
  - Rejects unknown keys with `400 guard.invalid_input`, listing the key.
  - Prevents silent misconfigurations (e.g., `refreshTokenTtlInDay` typo).
- **Pagination Links**:
  - Retains all values of repeated query parameters (e.g., `?types=SPA&types=Traditional`) instead of joining them.
- **One-Time Token Count**:
  - `Total-Number` header now counts only **matching tokens** when filtered by `email` or `status`.
- **Manual Unlock**:
  - Clears active security verification lockouts **longer than 60 minutes**.
  - API docs and UI now mention user IDs and security verification lockouts.

### 2. **SAML Applications**
- **Fix**: Attribute placeholders (e.g., `{attr.o365role}`) now return **actual user values** instead of literal placeholders.

---

## 🧰 **Documentation & Developer Experience**

### 1. **Swift Integration Guide**
- **Fix**: Code examples now use consistent client name.
- **Impact**: Fixes `Cannot find 'client' in scope` in Xcode.
- **Credit**: Thanks to @timokoethe.

---

## 🖥️ **Self-Hosting & OSS Notes**

### 1. **Review Before Upgrading**
- **Key Areas**:
  - OAuth 2.0 & Azure AD email sync
  - SAML assertion audience
  - Third-party Account API changes

### 2. **Node.js 26 Support**
- **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.

### 3. **Database Migration Required**
- **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)

### 4. **Database Connection Retries**
- **Improvement**: Retries on DNS failures (`ENOTFOUND`, `EAI_AGAIN`) at startup and CLI commands.
- **CLI Commands**: `db seed`, `db alteration deploy` now retry transient errors.

### 5. **Admin Endpoint Warning**
- **New Behavior**: Logs a warning once if `/console` request reaches default tenant due to **mismatched admin endpoint**.
- **Action**: Check Console URL and `ADMIN_ENDPOINT` environment variable.

---

## 🙌 **Contributors**
Huge thanks to the community for contributing to this release:

| Contributor | Contributions |
|-----------|---------------|
| [@nicolaj0](https://github.com/nicolaj0) | Webhook `deliveryId`, `hasPassword`, organization filter, `customClientMetadata` validation, social 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) | 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 Checklist** | Review security changes, run database migration, update Node.js if needed. |
| 🔄 **SAML Setup** | Ensure IdP audience matches SP Entity ID. |
| 🛠️ **API Integration** | Switch to **first-party apps** for Account API access. |
| 🧪 **Testing** | Test SAML, social sign-in, and OAuth flows post-upgrade. |
| 📦 **OSS Users** | Run `logto db alteration deploy` after upgrade. |

---

This release focuses on **security hardening**, **improved error handling**, **better developer experience**, and **enhanced stability** — making it a significant update for both self-hosted and cloud users.