Skip to content

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

Merged
patrislav merged 2 commits into
masterfrom
wdk-authcode-login
May 8, 2025
Merged

wdk: add support for non-PKCE authcode flow (required by Apple)#751
patrislav merged 2 commits into
masterfrom
wdk-authcode-login

Conversation

@patrislav

Copy link
Copy Markdown
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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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'

Comment thread packages/wallet/wdk/src/sequence/handlers/authcode-pkce.ts Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@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.

2 participants