The provided content is a **release notes document** for **Logto**, a developer-focused identity platform. It details changes, improvements, bug fixes, and security updates in a specific version (likely **v1.46.0**, based on the changelog link). Below is a **structured summary** of the key points, organized by category for clarity and ease of understanding.

---

## 🔐 **Security Hardening & Policy Changes**

### 1. **SAML Assertion Audience**
- **Change**: SAML assertions are now validated against the **Audience URI (SP Entity ID)** of the connector.
- **Impact**: If a SAML sign-in fails with `"SAML assertion audience does not match the SP entity ID"`, the **Identity Provider (IdP)** must be updated to include the correct **Audience URI**.
- **Action Required**: Update IdP configuration to match the connector’s SP Entity ID.

### 2. **Account API & Third-Party Applications**
- **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.

### 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**: Enhanced security and privacy.

### 4. **Single-Use Codes and Tokens**
- **Change**: One-time tokens (authorization codes, device codes, pushed auth requests, one-time tokens) are now **single-use only**.
- **Error on Reuse**:
  - `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` for malformed requests.
- **Improved Error Handling**: 400 instead of 500 for parsing failures (unless signed auth is required).

---

## 🛠️ **New Features & Enhancements**

### 1. **Connector Branding Before Email Match**
- **New Setting**: `Show SSO connector names and logos before email match`
- **Location**: `Console > Sign-in experience > Sign-up and sign-in > Advanced options`
- **Default**: On (current behavior)
- **Use Case**: Turn off to show SSO connectors only after email domain match.

### 2. **Logto Tunnel (v0.3.12)**
- **Security Improvements**:
  - **Symlinks**: Resolved before serving; files outside `--experience-path` return 404.
  - **Range Headers**: Clamped to file size; unsatisfiable ranges return 416.
- **Purpose**: Prevents directory traversal and ensures safe static file serving.

### 3. **Request Validation**
- **Change**: Limits validation output:
  - Only the **first 100 validation issues** are listed in `guard.invalid_input` errors.
  - Stops validating after **100 invalid fields** in `POST /callback` and `POST /account/callback/social`.

---

## 🐛 **Bug Fixes & Stability**

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

### 2. **Social Sign-in**
- **Unreachable Provider**: Returns `502 connector.social_provider_unreachable` with network error and connector ID.
- **Declined Authorization**: Returns `401 connector.authorization_failed` with provider-specific error codes (e.g., `access_denied`, `user_cancelled_authorize`).
- **Provider Errors**: Now show actual error messages instead of `{}`.

### 3. **OAuth & OIDC**
- **Fix**: Trims leading/trailing spaces in `scope` values during token refresh.
- **Example**: `" offline_access"` is now treated as `offline_access`.
- **Impact**: Prevents `invalid_scope` errors and improves user experience.

### 4. **Management API**
- **Custom Client Metadata**: Rejects unknown keys with `400 guard.invalid_input` and lists them.
- **Pagination Links**: Preserves repeated query parameters (e.g., `?types=SPA&types=Traditional`) instead of joining them.
- **One-Time Token Count**: `Total-Number` header now reflects filtered results.
- **Manual Unlock**: Clears security verification lockouts >60 minutes.

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

### 6. **Console & Account Center**
- **Application Access Control**: Organization selector now filters during search.
- **Role Permissions**: Full API resource names shown; truncated names have tooltips.
- **Account Center Branding**: Removes "Powered by Logto" during loading when branding is hidden.

### 7. **Documentation**
- **Swift Integration Guide**: Fixed inconsistent client name in code examples (prevents `Cannot find 'client' in scope` in Xcode).

---

## 🔄 **Connectors**

### 1. **Standard OAuth 2.0 & OIDC**
- **Fix**: Accepts `expires_in` as a string (e.g., from Criipto).
- **Fix**: Accepts `scope` as a JSON array (e.g., from Twitch), normalizing to space-delimited string.

### 2. **Patreon**
- **Fix**: Migrated from deprecated v1 API to v2 identity endpoint.
- **Result**: Patreon sign-in now works again.

### 3. **Connector Kit**
- **Performance**: `jsonGuard` and `jsonObjectGuard` now build schema once, improving performance for large JSON payloads.

---

## 🖥️ **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 security fixes.

### 3. **Database Migration Required**
- **Changes**: New columns for SAML static attributes and new sign-in/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 during CLI commands (`db seed`, `db alteration deploy`).

### 5. **Admin Endpoint Warning**
- **New Log**: Warns once if `/console` request reaches default tenant with mismatched origin.
- **Action**: Check Console URL and `ADMIN_ENDPOINT` configuration.

---

## 🙌 **Contributors**
Special thanks to the community for their contributions:

| Contributor | Contributions |
|-----------|---------------|
| [@nicolaj0](https://github.com/nicolaj0) | Webhook `deliveryId`, `hasPassword`, organization filters, `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 Actions for Users**

| Action | Description |
|------|-------------|
| 🔧 **Update SAML IdP** | Ensure Audience URI matches connector’s SP Entity ID. |
| 🔄 **Upgrade Database** | Run `logto db alteration deploy` after upgrading. |
| 🛠️ **Update Apps** | Use **first-party apps** for Account API calls. |
| 🧩 **Check Configuration** | Verify `ADMIN_ENDPOINT` and Console URL. |
| 📦 **Upgrade Node.js** | Ensure Node.js 26+ is used (if self-hosting). |
| 🧪 **Test Sign-in** | Verify SAML, social, and OAuth flows post-upgrade. |

---

This release focuses on **security hardening**, **improved error handling**, **better UX**, and **stability**. It also includes **critical fixes** for compatibility and **performance improvements** in connectors and validation.