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 social/enterprise SSO tokens
     - Reading backup codes, sessions, grants, and trusted devices

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.

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

5. **SAML Applications**  
   - Rejects malformed XML in SAML requests with `400 application.saml.invalid_saml_request`.
   - Logs format errors under `samlRequestError` in audit logs.
   - Returns 400 instead of 500 for unparseable requests (unless signed auth is 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**  
   - Migrated from deprecated v1 API to **v2 identity endpoint**.
   - Fixes sign-in issues caused by `410 Gone` errors.

3. **Connector Kit**  
   - Improved performance: `jsonGuard` and `jsonObjectGuard` now build schema **once**, not per nested value.

---

### 🖥️ **Console & Account Center**
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.
   - **Provider error messages**: Now show actual error messages instead of `{}`.

3. **OAuth & OIDC**  
   - Handles **space-padded scopes** (e.g., `" offline_access"`) by trimming whitespace.
   - Prevents invalid scope errors on token refresh.

4. **Management API**  
   - Validates `customClientMetadata` keys; rejects unknown keys with `400 guard.invalid_input`.
   - Pagination links preserve **repeated query parameters** (e.g., `?types=SPA&types=Traditional`).
   - `Total-Number` header in `/one-time-tokens` now counts only matching results.
   - Manual unlock clears **security verification lockouts >60 minutes**.

5. **SAML Applications**  
   - Fixed attribute mapping: placeholders like `{attr…}` now return actual user values.

6. **Console & Account Center UI**  
   - Application access control: Organization selector filters during search.
   - Role permissions: Full API resource names shown; truncated names have tooltips.
   - Account Center: Removes "Powered by Logto" during loading when branding is hidden.

---

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

---

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

2. **Node.js 26 Support**  
   - Official Docker image now uses **Node.js 26**.
   - Minimum supported versions:
     - Node.js 22.23.4
     - Node.js 24.22.1
     - Node.js 26.12.1

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
     ```

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

5. **Admin Endpoint Warning**  
   - Logs a warning if `/console` request reaches default tenant due to mismatched `ADMIN_ENDPOINT`.
   - Check Console URL and `ADMIN_ENDPOINT` configuration.

---

### 🌟 **Contributors**
Special thanks to:
- **@nicolaj0** – Multiple contributions (webhooks, user metadata, error handling, DNS retries, etc.)
- **@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)

---

### ✅ Summary of Key Actions for Users
| Action | Description |
|------|-------------|
| 🔁 **Upgrade** | Run `npm run alteration deploy` after upgrading. |
| 🔐 **Security** | Ensure SAML audience matches SP Entity ID. |
| 🛠️ **API Access** | Use **first-party apps** for Account API operations. |
| 🧪 **Testing** | Test SAML, social sign-in, and OAuth flows post-upgrade. |
| 📦 **Docker** | Update to Node.js 26 if using Docker. |

---

Let me know if you'd like a **cheat sheet**, **upgrade checklist**, or **migration guide** based on this release!