Skip to content

Conversation

magiziz
Copy link
Contributor

@magiziz magiziz commented Oct 3, 2025

Description

Fixed an issue where social login did not work with wallet button

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

For Linear issues: Closes APKT-3986
For GH issues: closes #...

Showcase (Optional)

If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

Note

Refactors connectSocial to correctly handle provider, popup, and events for social login with the wallet button, and adds unit tests for the flow.

  • Controllers:
    • packages/controllers/src/utils/ConnectorControllerUtil.ts:
      • Refactor connectSocial:
        • Use passed social as socialProvider; stop reading socialProvider/socialWindow from account state.
        • Simplify popup handling (track socialWindow locally; remove valtio ref).
        • Always emit SOCIAL_LOGIN_* events with provider.
        • Store connected provider and call connectExternal with received resultUri.
        • Adjust Farcaster flow checks and untrusted-origin error handling.
  • Tests:
    • packages/controllers/tests/utils/ConnectorControllerUtil.test.ts:
      • Add connectSocial tests to verify getSocialRedirectUri is called and update mocks/setup.
  • Versioning:
    • Changeset: patch releases for multiple @reown/* packages; note fix for social login with wallet button.

Written by Cursor Bugbot for commit e95f96f. This will update automatically on new commits. Configure here.

@Copilot Copilot AI review requested due to automatic review settings October 3, 2025 12:10
Copy link

changeset-bot bot commented Oct 3, 2025

🦋 Changeset detected

Latest commit: e95f96f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 25 packages
Name Type
@reown/appkit-controllers Patch
pay-test-exchange Patch
@reown/appkit-adapter-bitcoin Patch
@reown/appkit-adapter-ethers Patch
@reown/appkit-adapter-ethers5 Patch
@reown/appkit-adapter-solana Patch
@reown/appkit-adapter-wagmi Patch
@reown/appkit Patch
@reown/appkit-utils Patch
@reown/appkit-cdn Patch
@reown/appkit-cli Patch
@reown/appkit-codemod Patch
@reown/appkit-common Patch
@reown/appkit-core Patch
@reown/appkit-experimental Patch
@reown/appkit-pay Patch
@reown/appkit-polyfills Patch
@reown/appkit-scaffold-ui Patch
@reown/appkit-siwe Patch
@reown/appkit-siwx Patch
@reown/appkit-testing Patch
@reown/appkit-ui Patch
@reown/appkit-universal-connector Patch
@reown/appkit-wallet Patch
@reown/appkit-wallet-button Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Oct 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
appkit-basic-html Ready Ready Preview Comment Oct 3, 2025 0:41am
appkit-demo Ready Ready Preview Comment Oct 3, 2025 0:41am
appkit-gallery Ready Ready Preview Comment Oct 3, 2025 0:41am
appkit-laboratory Ready Ready Preview Comment Oct 3, 2025 0:41am
10 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
appkit-basic-example Ignored Ignored Oct 3, 2025 0:41am
appkit-basic-sign-client-example Ignored Ignored Oct 3, 2025 0:41am
appkit-basic-up-example Ignored Ignored Oct 3, 2025 0:41am
appkit-ethers5-bera Ignored Ignored Oct 3, 2025 0:41am
appkit-nansen-demo Ignored Ignored Oct 3, 2025 0:41am
appkit-vue-solana Ignored Ignored Oct 3, 2025 0:41am
appkit-wagmi-cdn-example Ignored Ignored Oct 3, 2025 0:41am
ethereum-provider-wagmi-example Ignored Ignored Oct 3, 2025 0:41am
next-wagmi-solana-bitcoin-example Ignored Ignored Oct 3, 2025 0:41am
vue-wagmi-example Ignored Ignored Oct 3, 2025 0:41am

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 fixes a bug where social login functionality was not working properly with the wallet button. The issue was related to incorrect data retrieval from ChainController when setting social provider and social window properties.

  • Reordered ChainController calls to ensure proper data retrieval after setting properties
  • Added comprehensive test coverage for the connectSocial functionality
  • Updated changeset documentation to reflect the bug fix

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/controllers/src/utils/ConnectorControllerUtil.ts Fixed order of operations to retrieve account data after setting properties
packages/controllers/tests/utils/ConnectorControllerUtil.test.ts Added test coverage for connectSocial functionality
.changeset/brown-roses-report.md Added changeset documentation for the bug fix

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

linear bot commented Oct 3, 2025

Copy link
Contributor

github-actions bot commented Oct 3, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 79.98% 36584 / 45740
🔵 Statements 79.98% 36584 / 45740
🔵 Functions 78.36% 4021 / 5131
🔵 Branches 86.58% 8816 / 10182
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/controllers/src/utils/ConnectorControllerUtil.ts 40.64% 59.09% 58.82% 40.64% 74-75, 95-108, 124-129, 134-196, 206-228, 249-252, 257-259, 262-264, 272-302, 309-310, 313-314, 326-348, 351-357
Generated in workflow #15543 for commit e95f96f by the Vitest Coverage Report Action

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