The provided content is a **release notes document** for **Logto**, a developer 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**

### 1. **SAML Assertion Audience**
- **Change**: SAML assertions are now accepted **only if the `Audience` matches the connector’s `Audience URI (SP Entity ID)`**.
- **Impact**: After upgrading, 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 the **SP Entity ID** shown in the connector settings.

### 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.
- **Result for third-party apps**: Receive `403 auth.third_party_application_forbidden`.
- **Note**: First-party apps (e.g., Account Center, Console) are unaffected.

### 3. **Connector Request Errors**
- **Change**: When a connector request fails (e.g., timeout), **sensitive data (headers, body, query strings)** are no longer logged or returned.
- **Only**: Error name, code, message, and request method/URL are retained.
- **Purpose**: Enhanced security and privacy.

### 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**: Reject malformed SAML XML (e.g., unescaped `&`, mismatched tags) with `400 application.saml.invalid_saml_request`.
- **Audit log**: Records the format error under `samlRequestError`.
- **Improved error handling**: 400 instead of 500 for unparseable requests (unless signed auth is required).

---

## 🛠️ **New Features & Improvements**

### 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 connectors only after email domain matches.

### 2. **Logto Tunnel v0.3.12**
- **Security hardening**:
  - **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**
- **Limitation**: Only the **first 100 validation issues** are listed in `guard.invalid_input` errors.
- **Endpoint**: `POST /callback/:connectorId` and `POST /account/callback/social/:connectorId` stop validating after 100 invalid fields.

---

## 🐞 **Bug Fixes & Stability**

### 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` 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 error messages**: Now show actual provider messages instead of `{}`.

### 3. **OAuth & OIDC**
- **Fix**: Leading/trailing spaces in `scope` are now ignored.
- **Example**: `" offline_access"` → treated as `offline_access`.
- **Benefit**: Prevents `invalid_scope` errors and improves refresh token handling.

### 4. **Management API**
- **`customClientMetadata`**: Rejects unknown keys with `400 guard.invalid_input` and lists them.
- **Pagination links**: Preserve 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 filters results 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 to avoid `Cannot find 'client' in scope` in Xcode.

---

## 🔄 **Connectors**

### 1. **Standard OAuth 2.0 & OIDC**
- **Fix**: Accepts `expires_in` as string (e.g., from Criipto).
- **Fix**: Accepts `scope` as 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**
- **Critical changes**:
  - 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**
- **Schema changes**: New columns for SAML static attributes and 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**
- **Improved resilience**: Retries on DNS failures (`ENOTFOUND`, `EAI_AGAIN`) at startup and CLI commands (`db seed`, `db alteration deploy`).

### 5. **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` configuration.

---

## 🙌 **Contributors**
Special thanks to:
- **@nicolaj0** – Multiple contributions (webhooks, metadata validation, error handling, DNS retries).
- **@RaphaelFakhri** – First contribution: pagination links.
- **@mvanhorn** – `ADMIN_ENDPOINT` mismatch warning.
- **@timokoethe** – Swift integration guide consistency.

---

## 🔗 **Full Changelog**
- [Compare 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. |
| 🔐 **Security** | Ensure SAML audience matches SP Entity ID; use first-party apps for Account API. |
| 🛠️ **Debugging** | Check logs for `403 auth.third_party_application_forbidden` or `502 connector.social_provider_unreachable`. |
| 📦 **Self-hosting** | Update Node.js to 26; ensure `ADMIN_ENDPOINT` matches Console URL. |
| 🧩 **Connectors** | Verify SAML and social connectors (especially Patreon) are working. |

---

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