wdk: add support for non-PKCE authcode flow (required by Apple)#751
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for a non-PKCE authcode flow for Apple by refactoring the existing authentication logic. Key changes include updating argument types and handler names (switching from AuthCodePkceHandler to AuthCodeHandler), revising the signer type for Apple, and updating the database schema for auth commitments.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/wallet/wdk/src/sequence/wallets.ts | Updated type definitions and handler usage to use AuthCodeHandler for Apple authentication. |
| packages/wallet/wdk/src/sequence/types/signer.ts | Renamed LoginApplePkce to LoginApple to reflect the new auth flow. |
| packages/wallet/wdk/src/sequence/manager.ts | Replaced instances of AuthCodePkceHandler with AuthCodeHandler and updated instanceof checks. |
| packages/wallet/wdk/src/sequence/index.ts | Removed export of the deprecated AuthCodePkceSignupArgs. |
| packages/wallet/wdk/src/sequence/handlers/authcode.ts | Introduced the new AuthCodeHandler for non-PKCE flows. |
| packages/wallet/wdk/src/sequence/handlers/authcode-pkce.ts | Made AuthCodePkceHandler extend AuthCodeHandler and adjusted behavior accordingly. |
| packages/wallet/wdk/src/identity/index.ts & challenge.ts | Updated challenge exports and added AuthCodeChallenge to support the new flow. |
| packages/wallet/wdk/src/dbs/auth-commitments.ts | Updated the auth commitment schema to match the new flow by altering types and making verifier/challenge optional. |
Comments suppressed due to low confidence (1)
packages/wallet/wdk/src/dbs/auth-commitments.ts:7
- Modifying the kind type to 'apple' and making verifier and challenge optional may affect parts of the code that expect these values. Ensure that downstream components properly handle cases when verifier and challenge are undefined.
kind: 'google-pkce' | 'apple'
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.