Skip to content

wdk: add support for non-PKCE authcode flow (required by Apple) #751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 8, 2025

Conversation

patrislav
Copy link
Member

No description provided.

@patrislav patrislav requested review from a team as code owners May 8, 2025 18:04
@patrislav patrislav requested a review from Copilot May 8, 2025 18:05
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'

@patrislav patrislav merged commit 53b7f83 into master May 8, 2025
3 checks passed
@patrislav patrislav deleted the wdk-authcode-login branch May 8, 2025 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant