Skip to content

Snyk fix 259390acd7312584b8bb38869d3538c9#195

Closed
Dargon789 wants to merge 7 commits intomasterfrom
snyk-fix-259390acd7312584b8bb38869d3538c9
Closed

Snyk fix 259390acd7312584b8bb38869d3538c9#195
Dargon789 wants to merge 7 commits intomasterfrom
snyk-fix-259390acd7312584b8bb38869d3538c9

Conversation

@Dargon789
Copy link
Owner

@Dargon789 Dargon789 commented Jan 9, 2026

Summary by Sourcery

Apply Apple authentication fixes across wallet and services packages and align related client exports and versions.

Bug Fixes:

  • Correct Apple OAuth authorization URL construction by omitting the scope parameter for Apple signups.
  • Fix Apple authentication handling across API, builder, guard, identity, indexer, marketplace, metadata, relayer, userdata, ABI, wallet core, dapp client, wallet primitives, and wallet WDK packages.

Enhancements:

  • Expose additional transport-related types and message enums from the dapp-client public API.
  • Bump multiple Sequence packages to version 3.0.0-beta.8 and record the changes in changelogs and changesets.

Tests:

  • Extend AuthCodeHandler tests to verify Apple authorization URLs exclude the scope parameter.

@codesandbox
Copy link

codesandbox bot commented Jan 9, 2026

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@sourcery-ai
Copy link

sourcery-ai bot commented Jan 9, 2026

Reviewer's Guide

Apple authentication handling is corrected across the wallet WDK and related services, versions are bumped to 3.0.0-beta.8, type exports for the dapp client are expanded, and Apple OAuth scopes are suppressed for Apple signups with corresponding tests and changeset metadata added.

Sequence diagram for Apple OAuth authorization URL generation

sequenceDiagram
  actor User
  participant DappClient
  participant WalletWDK as Wallet_WDK_AuthCodeHandler
  participant Apple as Apple_OAuth_Server

  User->>DappClient: Selects_Apple_login
  DappClient->>WalletWDK: startSignup(signupKind_apple)
  WalletWDK->>WalletWDK: build_auth_code_url(state)
  Note over WalletWDK: signupKind == apple
  WalletWDK->>WalletWDK: Create_search_params_without_scope
  WalletWDK->>DappClient: return_oauth_url
  DappClient->>User: Redirect_to_oauth_url
  User->>Apple: GET_authorize_without_scope_param
  Apple-->>User: Apple_signin_UI
  User->>Apple: Approve_signin
  Apple-->>DappClient: Redirect_back_with_auth_code
Loading

Flow diagram for conditional OAuth scope handling in AuthCodeHandler

flowchart TD
  A[Start_build_auth_code_url] --> B[Set_base_params_client_id_redirect_uri_response_type]
  B --> C[Check_signup_kind]
  C -->|signupKind_is_apple| D[Do_not_add_scope_param]
  C -->|signupKind_is_not_apple| E[Add_scope_openid_profile_email]
  D --> F[Create_search_params_from_params]
  E --> F[Create_search_params_from_params]
  F --> G[Return_oauthUrl_with_query_string]
  G --> H[End]
Loading

File-Level Changes

Change Details Files
Adjust Apple OAuth authorization URL to omit scope parameter for Apple signups and add regression coverage.
  • Modify auth code handler to conditionally include the OAuth scope parameter only for non-Apple signup kinds.
  • Update unit test to assert that Apple authorization URLs no longer contain a scope query parameter.
packages/wallet/wdk/src/sequence/handlers/authcode.ts
packages/wallet/wdk/test/authcode.test.ts
Expose additional transport-related message types from the dapp client public API surface.
  • Export TransportMessage type from the dapp client types barrel.
  • Export MessageType enum alongside existing RequestActionType and TransportMode exports.
packages/wallet/dapp-client/src/index.ts
Bump versions of multiple services, wallet, and utility packages to 3.0.0-beta.8 and record Apple auth-related patch notes.
  • Add 3.0.0-beta.7 and 3.0.0-beta.8 entries documenting Apple auth fixes and dependency bumps in various package changelogs.
  • Update package.json versions from 3.0.0-beta.6 to 3.0.0-beta.8 for affected API, services, wallet, and utility packages.
  • Add changeset files describing patch releases for Apple auth fixes.
packages/wallet/wdk/CHANGELOG.md
packages/wallet/dapp-client/CHANGELOG.md
packages/wallet/core/CHANGELOG.md
packages/services/relayer/CHANGELOG.md
packages/services/api/CHANGELOG.md
packages/services/builder/CHANGELOG.md
packages/services/guard/CHANGELOG.md
packages/services/identity-instrument/CHANGELOG.md
packages/services/indexer/CHANGELOG.md
packages/services/marketplace/CHANGELOG.md
packages/services/metadata/CHANGELOG.md
packages/services/userdata/CHANGELOG.md
packages/utils/abi/CHANGELOG.md
packages/wallet/primitives/CHANGELOG.md
packages/services/api/package.json
packages/services/builder/package.json
packages/services/guard/package.json
packages/services/identity-instrument/package.json
packages/services/indexer/package.json
packages/services/marketplace/package.json
packages/services/metadata/package.json
packages/services/relayer/package.json
packages/services/userdata/package.json
packages/utils/abi/package.json
packages/wallet/core/package.json
packages/wallet/dapp-client/package.json
packages/wallet/primitives/package.json
packages/wallet/wdk/package.json
.changeset/new-turkeys-double.md
.changeset/nice-tips-slide.md
.changeset/pre.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@snyk-io
Copy link

snyk-io bot commented Jan 9, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Repository owner deleted a comment from vercel bot Jan 9, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @Dargon789, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request integrates a Snyk-identified security fix primarily focused on refining Apple authentication processes across the @0xsequence ecosystem. It ensures compliance with Apple's specific requirements for OAuth flows by conditionally handling the 'scope' parameter, alongside comprehensive package version updates and corresponding changelog entries to reflect these critical adjustments.

Highlights

  • Apple Authentication Fixes: Implemented specific fixes for Apple authentication flows, particularly concerning the conditional inclusion of the scope parameter during OAuth URL generation. This addresses potential issues with Apple's authentication requirements.
  • Package Version Updates: Numerous @0xsequence packages across services, utilities, and wallet components have been updated to version 3.0.0-beta.8. This includes @0xsequence/api, @0xsequence/builder, @0xsequence/guard, @0xsequence/identity-instrument, @0xsequence/indexer, @0xsequence/marketplace, @0xsequence/metadata, @0xsequence/relayer, @0xsequence/userdata, @0xsequence/abi, @0xsequence/wallet-core, @0xsequence/dapp-client, @0xsequence/wallet-primitives, and @0xsequence/wallet-wdk.
  • Changelog and Versioning Management: New changeset files (.changeset/new-turkeys-double.md and .changeset/nice-tips-slide.md) were added to document the Apple auth fixes. The .changeset/pre.json file was updated to reflect the new beta versions and include these changesets, ensuring proper versioning and release notes generation.
  • New Exports in Dapp Client: The packages/wallet/dapp-client/src/index.ts file now exports TransportMessage and MessageType, making these types available for external use.
  • Auth Code Handler Logic Refinement: The AuthCodeHandler in packages/wallet/wdk was modified to ensure the scope parameter is only included in the OAuth authorization URL when the signupKind is not 'apple', aligning with Apple's specific authentication protocols.
  • Test Coverage for Apple Auth: A new test case was added to packages/wallet/wdk/test/authcode.test.ts to explicitly verify that the scope parameter is absent from the Apple authentication URL, confirming the correct implementation of the conditional logic.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The auth code handler’s special-casing of signupKind === 'apple' to omit scope could benefit from an inline comment or reference to Apple’s OAuth/OpenID behavior so future maintainers understand why this divergence from other providers is required.
  • There are two new changeset files (new-turkeys-double and nice-tips-slide) that appear to describe the same Apple auth change set; consider consolidating them into a single changeset to avoid duplicate patch bumps and potential version noise.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The auth code handler’s special-casing of `signupKind === 'apple'` to omit `scope` could benefit from an inline comment or reference to Apple’s OAuth/OpenID behavior so future maintainers understand why this divergence from other providers is required.
- There are two new changeset files (`new-turkeys-double` and `nice-tips-slide`) that appear to describe the same Apple auth change set; consider consolidating them into a single changeset to avoid duplicate patch bumps and potential version noise.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses an issue with Apple authentication by correctly omitting the scope parameter from the OAuth authorization URL. The change is implemented cleanly and is accompanied by a new test to verify the fix. Additionally, the PR includes version bumps for multiple packages and exposes new types from the dapp-client API. I have one minor suggestion to improve maintainability by extracting a magic string to a constant. Overall, the changes are correct and well-implemented.

@Dargon789 Dargon789 enabled auto-merge (squash) January 9, 2026 09:34
@Dargon789 Dargon789 self-assigned this Jan 9, 2026
@Dargon789 Dargon789 added bug Something isn't working documentation Improvements or additions to documentation duplicate This issue or pull request already exists enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers invalid This doesn't seem right question Further information is requested dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Jan 9, 2026
Copy link
Owner Author

@Dargon789 Dargon789 left a comment

Choose a reason for hiding this comment

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

Snyk fix 259390acd7312584b8bb38869d3538c9#195

@Dargon789 Dargon789 disabled auto-merge January 19, 2026 08:22
@Dargon789 Dargon789 enabled auto-merge (rebase) January 19, 2026 08:22
@Dargon789 Dargon789 closed this Jan 19, 2026
auto-merge was automatically disabled January 19, 2026 08:23

Pull request was closed

@github-project-automation github-project-automation bot moved this from Backlog to Done in Hardhat Jan 19, 2026
@github-project-automation github-project-automation bot moved this from Todo to Done in web3-Defi-Gamefi Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation duplicate This issue or pull request already exists enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed invalid This doesn't seem right javascript Pull requests that update javascript code question Further information is requested

Projects

Archived in project
Status: Done

4 participants