Repository navigation
feat: SDK update for version 29.1.0 - #170
Conversation
Adds the optional state parameter to createOAuth2Token (appwrite/appwrite#14157).
🔵 Tier A · Mergeable after minor fixes
Adds an optional OAuth2
Fix with agent prompt### Issue 1
src/services/account.ts:3013-3015
**Add regression coverage for OAuth2 state forwarding**
The existing `createOAuth2Token` test in `test/services/account.test.js:1130` calls only the provider argument and returns a fixed redirect, so it would still pass if state were dropped. Please cover both calling styles, verifying the outgoing URL's decoded state (including query-special characters) and omission when state is undefined.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.📂 Walkthrough · 6
Reviewed |
| if (typeof state !== 'undefined') { | ||
| apiPayload['state'] = state; | ||
| } |
There was a problem hiding this comment.
Add regression coverage for OAuth2 state forwarding
The existing createOAuth2Token test in test/services/account.test.js:1130 calls only the provider argument and returns a fixed redirect, so it would still pass if state were dropped. Please cover both calling styles, verifying the outgoing URL's decoded state (including query-special characters) and omission when state is undefined.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/services/account.ts
Line: 3013-3015
Comment:
**Add regression coverage for OAuth2 state forwarding**
The existing `createOAuth2Token` test in `test/services/account.test.js:1130` calls only the provider argument and returns a fixed redirect, so it would still pass if state were dropped. Please cover both calling styles, verifying the outgoing URL's decoded state (including query-special characters) and omission when state is undefined.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.🟡 Minor · testing · Reply if this doesn't apply.
This PR contains updates to the SDK for version 29.1.0.
What's Changed
stateparameter oncreateOAuth2Token, returned unchanged on the success and failure URLsThis is a patch on top of 29.0.0: it adds only the
stateparameter from appwrite/appwrite#14157, plus the version bump and changelog.mainis already at 30.0.0-rc.2, so this targets a29.xbranch cut from tag29.0.0; 29.1.0 is released from29.x.