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, to help you quickly understand what's new or changed:

---

### 🔐 **Security Hardening**
1. **SAML Assertion Audience**  
   - SAML assertions are now validated against the **SP Entity ID (Audience URI)**.
   - If a SAML sign-in fails with `"SAML assertion audience does not match the SP entity ID"`, update your **Identity Provider (IdP)** to use the correct **Audience URI** from the connector settings.

2. **Account API & Third-Party Apps**  
   - All Account API operations now require a **first-party application**.
   - Third-party apps receive `403 auth.third_party_application_forbidden` when trying to access restricted endpoints.
   - Affected endpoints:
     - Retrieving/refreshing SSO provider tokens (`GET`, `PUT` `/api/my-account/...`)
     - Reading backup codes, sessions, grants, trusted devices
   - **Solution**: Use a first-party app (e.g., Account Center, Console) to access these features.

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

4. **Single-Use Codes & Tokens**  
   - Authorization codes, device codes, pushed auth requests, and one-time tokens are now **single-use only**.
   - Reuse results in:
     - `invalid_grant` (authorization code)
     - `invalid_request_uri` (pushed auth request)
     - `one_time_token.token_consumed` (one-time token)
   - **Note**: Refresh tokens still support reuse within their window.

5. **SAML Applications**  
   - Rejects malformed SAML XML (e.g., unescaped `&`, mismatched tags) with `400 application.saml.invalid_saml_request`.
   - Logs format errors in audit logs under `samlRequestError`.
   - Prevents 500 errors for unparseable requests when signed auth is not required.

---

### 🛠️ **Connectors & Integrations**
1. **Standard OAuth 2.0 & OIDC**  
   - Supports `expires_in` as a **string** (e.g., from Criipto).
   - Accepts `scope` as a **JSON array** (e.g., from Twitch), normalizing it to a space-separated string.

2. **Patreon Connector**  
   - V1 API deprecated → now uses **Patreon API v2** identity endpoint.
   - Fixes sign-in issues caused by `410 Gone` errors.

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

---

### 🧩 **User Experience & Sign-In**
1. **Sign-In Experience**  
   - Fixed blank sign-in page 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 details.
   - **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**  
   - **Space-padded scopes** (e.g., `" offline_access"`) are now ignored.
   - Leading/trailing spaces are trimmed; empty scopes are treated as omitted.

4. **Sign-In Branding**  
   - New setting: **"Show SSO connector names and logos before email match"**.
   - Enabled by default (current behavior). Disable to show only after email domain match.

---

### 📦 **API & Management**
1. **Management API**  
   - **`customClientMetadata`**: Rejects unknown keys with `400 guard.invalid_input` and lists them in response.
   - **Pagination links**: Preserve all 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 active security verification lockouts >60 minutes.

2. **SAML Applications**  
   - Fixed attribute placeholders (e.g., `{attr.o365role}`) now return actual user values.

---

### 🖥️ **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 load when branding is hidden.

---

### 📚 **Documentation**
- **Swift integration guide**: Fixed inconsistent client name in code examples (previously caused `Cannot find 'client' in scope` in Xcode).
  - Fixed in PR #9788 by @timokoethe.

---

### 🧰 **Self-Hosting & OSS Notes**
1. **Review Before Upgrading**  
   - Check changes in:
     - OAuth 2.0 & Azure AD email sync
     - SAML assertion audience
     - Third-party Account API

2. **Node.js 26 Support**  
   - Official Docker image now runs on **Node.js 26**.
   - Minimum versions:
     - Node.js 22: 22.23.4
     - Node.js 24: 24.22.1
     - Node.js 26: 26.12.1
   - Includes **October 2026 security fixes**.

3. **Database Migration Required**  
   - Schema changes include:
     - New columns for SAML static attributes
     - New sign-in experience and Account Center settings
   - Run:  
     ```bash
     npm run alteration deploy
     # or
     logto db alteration deploy
     ```
   - See [upgrade guide](https://docs.logto.io/logto-oss/upgrading-oss-version).

4. **Database Connection Retries**  
   - Retries on DNS failures (`ENOTFOUND`, `EAI_AGAIN`) at startup and CLI commands (`db seed`, `db alteration deploy`).
   - Improves resilience during deployment.

5. **Admin Endpoint Warning**  
   - Logs warning if `/console` request reaches default tenant with mismatched origin.
   - Check **Console URL** and `ADMIN_ENDPOINT` environment variable.

---

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

---

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

---

### ✅ **Action Items for Users**
| Task | Description |
|------|-------------|
| 🔁 **Upgrade** | Ensure you run `npm run alteration deploy` after upgrading. |
| 🔐 **Security** | Update SAML audience and switch to first-party apps for Account API. |
| 🛠️ **Debugging** | Check logs for `403 auth.third_party_application_forbidden` or `502 connector.social_provider_unreachable`. |
| 📦 **OSS Users** | Update to Node.js 26 and verify `ADMIN_ENDPOINT` matches Console URL. |

---

Let me know if you'd like a **cheat sheet**, **upgrade checklist**, or **summary for developers**!