Repository navigation
feat: SDK update for version 22.1.0 - #73
Conversation
Adds the optional state parameter to createOAuth2Token (appwrite/appwrite#14157).
🔵 Tier A · Mergeable after minor fixes
Adds an optional
Fix with agent prompt### Issue 1
Sources/Appwrite/Services/Account.swift:2178
**Escape state as a query value before sending it**
A state such as `a&b` will reach the server as `a`, rather than being returned unchanged: `Client.parametersToQueryString` concatenates raw values and encodes the whole query with `.urlHostAllowed`, which leaves `&` unescaped. Please encode individual query values in the serializer so the new argument preserves arbitrary state strings without introducing extra parameters.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.📂 Walkthrough · 5
Reviewed |
| "success": success, | ||
| "failure": failure, | ||
| "scopes": scopes, | ||
| "state": state, |
There was a problem hiding this comment.
Escape state as a query value before sending it
A state such as a&b will reach the server as a, rather than being returned unchanged: Client.parametersToQueryString concatenates raw values and encodes the whole query with .urlHostAllowed, which leaves & unescaped. Please encode individual query values in the serializer so the new argument preserves arbitrary state strings without introducing extra parameters.
Prompt To Fix With AI
This is a comment left during a code review.
Path: Sources/Appwrite/Services/Account.swift
Line: 2178
Comment:
**Escape state as a query value before sending it**
A state such as `a&b` will reach the server as `a`, rather than being returned unchanged: `Client.parametersToQueryString` concatenates raw values and encodes the whole query with `.urlHostAllowed`, which leaves `&` unescaped. Please encode individual query values in the serializer so the new argument preserves arbitrary state strings without introducing extra parameters.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.🟡 Minor · bug · Reply if this doesn't apply.
This PR contains updates to the SDK for version 22.1.0.
What's Changed
stateparameter oncreateOAuth2Token, returned unchanged on the success and failure URLsThis is a patch on top of the previous stable release: it adds only the
stateparameter from appwrite/appwrite#14157, plus the version bump and changelog. Generated by diffing the sdk-generator output for the specs before and after #14157.