The provided content is a **release notes document** for **Logto**, a developer-focused identity platform. It details the changes, improvements, bug fixes, and updates in a specific version (likely **v1.46.0**) of the Logto platform.

Here's a breakdown of the key sections and what they mean:

---

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

1. **SAML Assertion Audience**  
   - **Change**: SAML assertions are now only accepted if the `Audience` value **exactly 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"`, you must **update your identity provider (IdP)** to set the audience to the correct SP Entity ID.
   - **Why**: This improves security by ensuring SAML responses are only accepted by the intended service.

2. **Account API & Third-Party Apps**  
   - **Change**: Access to sensitive Account API operations (e.g., retrieving SSO tokens, backup codes, sessions) now **requires a first-party app**.
   - **Impact**: Third-party apps will now get a `403 auth.third_party_application_forbidden` error.
   - **Why**: Aligns with a "first-party only" policy to prevent misuse of sensitive data.

3. **Connector Request Errors**  
   - **Change**: When a connector makes an outbound request (e.g., to a third-party service), **sensitive data (headers, body, query strings)** is no longer logged or exposed in error responses.
   - **Impact**: Logs and telemetry now show only the error name, code, and message.
   - **Why**: Enhances privacy and reduces risk of leaking credentials or tokens.

4. **Single-Use Codes & Tokens**  
   - **Change**: Authorization codes, device codes, pushed auth requests, and one-time tokens can now be used **only once**.
   - **Impact**: Reusing them returns errors like `invalid_grant` or `one_time_token.token_consumed`.
   - **Why**: Prevents replay attacks and improves security.

5. **SAML Applications**  
   - **Change**: Malformed SAML XML (e.g., unescaped `&`, mismatched tags) now returns a `400` error instead of a `500`.
   - **Impact**: Better error handling and audit logging.
   - **Why**: Improves reliability and makes debugging easier.

---

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

1. **Connector Branding Before Email Match**  
   - A new setting (`Show SSO connector names and logos before email match`) lets you control whether SSO connectors appear **before** a user’s email domain is matched.
   - **Default**: On (current behavior).
   - **Use case**: Useful for hiding SSO options until a user’s domain is verified.

2. **Logto Tunnel (v0.3.12)**  
   - **Security**: Symlinks outside the `--experience-path` now return 404.
   - **Range Headers**: `Range` requests that go past the file end are clamped; unsatisfiable ranges return `416`.
   - **Why**: Prevents directory traversal and improves security.

3. **Request Validation**  
   - **Change**: Limits validation to **100 issues** per request (both in error responses and validation).
   - **Impact**: Prevents overly large error messages and improves performance.

4. **OAuth & OIDC**  
   - **Change**: Leading/trailing spaces in `scope` values are now ignored.
   - **Impact**: Fixes issues with clients like OpenAI Codex that send ` "offline_access"` (with a leading space).
   - **Why**: Improves compatibility.

5. **Management API**  
   - **Change**: Rejects unknown keys in `customClientMetadata` with a clear error.
   - **Impact**: Prevents typos from silently failing.
   - **Other**: Pagination links now preserve repeated query parameters (e.g., `?types=SPA&types=Traditional`).

6. **SAML Applications**  
   - **Change**: Attribute placeholders (e.g., `{attr.o365role}`) now resolve to actual values instead of being sent as literal strings.

7. **Console & Account Center**  
   - **Improvements**:
     - Organization selector now filters during search.
     - Role permissions show full API resource names with tooltips.
     - "Powered by Logto" is hidden during loading when branding is disabled.

8. **Documentation**  
   - **Fix**: Swift integration guide now uses consistent client names, fixing a `Cannot find 'client' in scope` error in Xcode.

---

### 🐞 **Bug Fixes**

1. **Sign-in Experience**  
   - Fixed blank sign-in page on **older Safari/iOS (pre-16.4)** by compiling for iOS 15/Safari 15+.

2. **Social Sign-in**  
   - **Unreachable Provider**: Now returns `502 connector.social_provider_unreachable` with network details.
   - **Declined Authorization**: Returns `401 connector.authorization_failed` with provider-specific error messages.
   - **Error Messages**: Now show actual provider errors instead of `{}`.

3. **Connectors**  
   - **OAuth 2.0 & OIDC**: Now supports `expires_in` as a string and `scope` as a JSON array (e.g., from Criipto, Twitch).
   - **Patreon**: Fixed broken connector by switching to API v2.
   - **Connector Kit**: Improved JSON validation performance.

---

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

1. **Review Before Upgrading**  
   - Check for changes in **SAML audience**, **OAuth 2.0**, and **third-party API access**.

2. **Node.js 26 Support**  
   - Docker image now runs on **Node.js 26**.
   - Minimum versions: 22.23.4, 24.22.1, 26.12.1 (includes security fixes).

3. **Database Migration Required**  
   - Schema changes (SAML attributes, sign-in settings) require running:
     ```bash
     npm run alteration deploy
     ```
     or
     ```bash
     logto db alteration deploy
     ```

4. **Database Connection Retries**  
   - Now retries on DNS failures (`ENOTFOUND`, `EAI_AGAIN`) at startup and during CLI commands.

5. **Admin Endpoint Warning**  
   - Logs a warning if a `/console` request reaches the default tenant due to a mismatched `ADMIN_ENDPOINT`.

---

### 🙌 **Contributors**

Thanks to:
- **@nicolaj0** – Multiple contributions (error handling, metadata validation, DNS retries).
- **@RaphaelFakhri** – First contribution (pagination links).
- **@mvanhorn** – Admin endpoint warning.
- **@timokoethe** – Swift 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 for Users & Developers**

| Area | Key Takeaway |
|------|-------------|
| **Security** | SAML audience matching, first-party app requirement, and reduced logging of sensitive data improve security. |
| **Compatibility** | Better handling of malformed SAML, space-padded scopes, and JSON arrays. |
| **User Experience** | Fixed sign-in issues on older iOS/Safari, improved error messages. |
| **Self-Hosting** | **Must run database migration** after upgrade. Node.js 26 is now supported. |
| **Third-Party Apps** | Will be blocked from accessing sensitive API endpoints unless they are first-party. |

---

### 📌 **Action Items for Users**
1. **Upgrade**: Run `logto db alteration deploy` after upgrading.
2. **Check SAML**: Update IdP audience to match SP Entity ID.
3. **Update Apps**: Ensure third-party apps use first-party apps for Account API access.
4. **Review Docs**: Check the [upgrade guide](https://docs.logto.io/logto-oss/upgrading-oss-version) for details.

Let me know if you'd like a **summary for developers**, **for admins**, or **a checklist for upgrading**!