Skip to content

chore: improve social login latency #4107

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

svenvoskamp
Copy link
Contributor

@svenvoskamp svenvoskamp commented Mar 31, 2025

Description

Removed an abundant call to magic, so we improve the social login latency. I’ve made some changes to the logic for how we connect with the w3mFrameProvider. Within the connect call, we can now either make a request to Magic to retrieve the user or initiate a social login. These changes also require updates to the schema on the secure site.

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-xxx
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

Copy link

changeset-bot bot commented Mar 31, 2025

🦋 Changeset detected

Latest commit: 641ae1e

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

This PR includes changesets to release 20 packages
Name Type
@reown/appkit-adapter-ethers5 Patch
@reown/appkit-adapter-ethers Patch
@reown/appkit-adapter-solana Patch
@reown/appkit-adapter-wagmi Patch
@reown/appkit-wallet-button Patch
@reown/appkit-utils Patch
@reown/appkit-controllers Patch
@reown/appkit-scaffold-ui Patch
@reown/appkit Patch
@reown/appkit-wallet Patch
@reown/appkit-adapter-bitcoin Patch
@reown/appkit-cdn Patch
@reown/appkit-cli Patch
@reown/appkit-common Patch
@reown/appkit-core Patch
@reown/appkit-experimental Patch
@reown/appkit-polyfills Patch
@reown/appkit-siwe Patch
@reown/appkit-siwx Patch
@reown/appkit-ui 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 Mar 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
appkit-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2025 7:44am
appkit-laboratory ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2025 7:44am
12 Skipped Deployments
Name Status Preview Comments Updated (UTC)
appkit-basic-ep ⬜️ Ignored (Inspect) Apr 9, 2025 7:44am
appkit-basic-ep-example ⬜️ Ignored (Inspect) Apr 9, 2025 7:44am
appkit-basic-example ⬜️ Ignored (Inspect) Apr 9, 2025 7:44am
appkit-basic-sign-client-example ⬜️ Ignored (Inspect) Apr 9, 2025 7:44am
appkit-basic-up-example ⬜️ Ignored (Inspect) Apr 9, 2025 7:44am
appkit-ethers5-bera ⬜️ Ignored (Inspect) Apr 9, 2025 7:44am
appkit-nansen-demo ⬜️ Ignored (Inspect) Apr 9, 2025 7:44am
appkit-vue-solana ⬜️ Ignored (Inspect) Apr 9, 2025 7:44am
appkit-wagmi-cdn-example ⬜️ Ignored (Inspect) Apr 9, 2025 7:44am
ethereum-provider-wagmi-example ⬜️ Ignored (Inspect) Visit Preview Apr 9, 2025 7:44am
next-wagmi-solana-bitcoin-example ⬜️ Ignored (Inspect) Apr 9, 2025 7:44am
vue-wagmi-example ⬜️ Ignored (Inspect) Apr 9, 2025 7:44am

Copy link
Contributor

github-actions bot commented Mar 31, 2025

Warnings
⚠️ File packages/adapters/ethers/src/client.ts contains a KEY or SECRET
⚠️ File packages/adapters/ethers5/src/client.ts contains a KEY or SECRET
⚠️ File packages/adapters/solana/src/client.ts contains a KEY or SECRET
⚠️ File packages/adapters/solana/src/providers/AuthProvider.ts contains a KEY or SECRET
⚠️ File packages/adapters/wagmi/src/client.ts contains a KEY or SECRET
⚠️ File packages/appkit-utils/src/solana/SolanaTypesUtil.ts contains a KEY or SECRET
⚠️ File packages/appkit/src/client/appkit-base-client.ts contains a KEY or SECRET
⚠️ File packages/controllers/src/controllers/ConnectionController.ts contains a KEY or SECRET
⚠️ File packages/wallet-button/src/utils/ConnectorUtil.ts contains a KEY or SECRET
⚠️ File packages/wallet/src/W3mFrameProvider.ts contains a KEY or SECRET
⚠️ File packages/wallet/src/W3mFrameSchema.ts contains a KEY or SECRET

Generated by 🚫 dangerJS against 641ae1e

Copy link
Contributor

github-actions bot commented Mar 31, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 74.54% 25048 / 33602
🔵 Statements 74.54% 25048 / 33602
🔵 Functions 66.09% 2117 / 3203
🔵 Branches 83.18% 4827 / 5803
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/adapters/ethers/src/client.ts 49.44% 60.56% 61.76% 49.44% 44-107, 123-124, 155-156, 170-193, 196-206, 219-256, 262-263, 270-287, 292-299, 302-324, 327-332, 344-345, 352-358, 372-373, 382-383, 399-409, 412-441, 445-446, 459-460, 462, 473-474, 485-486, 517-518, 522, 536, 553-555, 562-566, 612-617, 626-644, 650-651, 655-660, 669-670, 681-682, 688-700
packages/adapters/ethers5/src/client.ts 48.08% 56.92% 61.76% 48.08% 45-108, 124-125, 156-157, 171-194, 197-207, 220-256, 262-263, 270-287, 292-299, 302-324, 327-332, 343-344, 351-357, 371-372, 381-382, 398-427, 430-440, 444-445, 458-459, 461, 472-473, 485-486, 519-520, 524, 538, 555-557, 564-568, 606-620, 628-646, 652-653, 657-662, 671-672, 683-684, 690-702
packages/adapters/solana/src/client.ts 56.35% 72.5% 35.48% 56.35% 63-70, 74-75, 102-105, 108-111, 114-115, 118-119, 122-123, 126-129, 132-140, 147-148, 158-178, 181-214, 217-218, 221-222, 230-231, 265-266, 276-277, 296-297, 304-305, 329-331, 334-338, 344, 359-365, 368-375, 391-392, 398-402, 405-411
packages/adapters/solana/src/providers/AuthProvider.ts 73.55% 76.47% 69.23% 73.55% 44-49, 60-61, 75-76, 119-127, 141-142, 156-157, 160-171
packages/adapters/wagmi/src/client.ts 75.73% 60.57% 77.14% 75.73% 111-139, 230-234, 259-260, 283, 285, 314-315, 368-371, 376-377, 387-388, 427-428, 456, 472-487, 497-498, 515-516, 520-521, 540-551, 560-561, 572-573, 621, 625-626, 648-649, 657-658, 663-664, 668-673, 680-681, 689-690, 695-696, 705-706, 714-715, 720-721, 727-749, 752-759
packages/adapters/wagmi/src/connectors/AuthConnector.ts 5.83% 100% 50% 5.83% 32-33, 36-172
packages/appkit/src/adapters/ChainAdapterBlueprint.ts 90.9% 97.05% 76.47% 90.9% 139-140, 163-167, 173-176
packages/appkit/src/client/appkit-base-client.ts 71.01% 88.14% 76.71% 71.01% 179-180, 182-183, 188-189, 259-260, 296-302, 331-350, 353-397, 400-405, 422-426, 439-454, 479-485, 488-498, 501-513, 516-518, 521-523, 526-528, 531-533, 536-542, 545-548, 564-576, 582-615, 618-628, 682-683, 689, 700-714, 720-727, 740-744, 784-785, 826-830, 836-837, 849, 872-877, 943, 964-965, 975, 977-993, 998, 1037-1038, 1054-1055, 1060-1061, 1094-1101, 1147-1151, 1180-1183, 1187, 1203-1213, 1235-1246, 1275-1276, 1282-1308, 1464-1465, 1485-1486, 1489-1490, 1505-1508, 1511-1512, 1532-1533, 1536-1537, 1557-1558, 1571, 1575, 1580-1599, 1602-1611, 1626-1627, 1670-1673, 1676-1677, 1765-1766, 1769-1772, 1775-1776, 1779-1780, 1783-1784, 1787-1788, 1791-1795, 1804-1813, 1822-1833, 1242, 1582-1603
packages/appkit/src/client/appkit.ts 56.05% 84.09% 83.33% 56.05% 63-77, 80-87, 90-107, 110-116, 121, 125, 137, 143-146, 149, 151-152, 157, 201-204, 207-210, 213-220, 228-229, 236-237, 268-276, 280-282, 293-296, 298-305, 307, 309-328, 330-344, 351-352, 371-372, 398-399, 403-467, 508-511, 518-522
packages/controllers/src/controllers/ConnectionController.ts 78.88% 75.51% 47.45% 78.88% 110-130, 172, 180, 184, 192, 196, 200, 204, 208, 212, 238-239, 242-243, 278, 282, 293-294, 96-251
packages/scaffold-ui/src/views/w3m-connecting-social-view/index.ts 82.06% 64.28% 62.5% 82.06% 55-56, 58-59, 113, 191-203, 209-216
packages/wallet-button/src/utils/ConnectorUtil.ts 16.79% 100% 20% 16.79% 72-86, 88-250, 252-274, 276-319
packages/wallet/src/W3mFrameProvider.ts 45.9% 68.18% 45.33% 45.9% 62-64, 70-74, 90-99, 119-127, 136-138, 146-161, 163-172, 176-188, 191-204, 207-219, 222-233, 236-251, 260-262, 274-276, 280-307, 310-319, 331-332, 341-343, 358-360, 369-370, 380-382, 391-393, 397-413, 416-427, 430-444, 457-459, 463-474, 477-496, 513-521, 525-533, 539-541, 549-551, 556-565, 571-575, 581-585, 590-591, 597-599, 603-604, 643-645, 648, 656-657, 669-676, 691-692, 704-708, 717-721, 724-569
packages/wallet/src/W3mFrameSchema.ts 100% 100% 100% 100%
Generated in workflow #10809 for commit 641ae1e by the Vitest Coverage Report Action

Copy link

@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 improves social login latency by reducing redundant calls and updating connection logic to support a new socialUri parameter. The changes update various adapter connectors and their clients to conditionally pass along the socialUri parameter for improved social login flow.

  • Added socialUri parameter to connection methods in wagmi, solana, ethers, and bitcoin adapters.
  • Updated CHANGELOGs and changeset entries to document test versions for social login improvements.

Reviewed Changes

Copilot reviewed 52 out of 59 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/appkit-utils/CHANGELOG.md Updated changelog with a test version and dependency updates
packages/adapters/wagmi/src/connectors/AuthConnector.ts Added socialUri support in the connect method
packages/adapters/wagmi/src/client.ts Updated connection parameters to pass socialUri with a TS override
packages/adapters/wagmi/CHANGELOG.md Updated changelog documentation for wagmi adapter
packages/adapters/solana/src/providers/AuthProvider.ts Added socialUri option to the connect call
packages/adapters/solana/src/client.ts Updated connection parameters to pass socialUri
packages/adapters/solana/CHANGELOG.md Updated changelog documentation for solana adapter
packages/adapters/ethers5/src/client.ts Added socialUri parameter in the ethers5 adapter connect method
packages/adapters/ethers5/CHANGELOG.md Updated changelog documentation for ethers5 adapter
packages/adapters/ethers/src/client.ts Added socialUri parameter in the ethers adapter connect method
packages/adapters/ethers/CHANGELOG.md Updated changelog documentation for ethers adapter
packages/adapters/bitcoin/CHANGELOG.md Updated changelog documentation for bitcoin adapter
.changeset/modern-eyes-smash.md Added changeset entry to include social login improvements test version
Files not reviewed (7)
  • .changeset/pre.json: Language not supported
  • packages/adapters/bitcoin/package.json: Language not supported
  • packages/adapters/ethers/package.json: Language not supported
  • packages/adapters/ethers5/package.json: Language not supported
  • packages/adapters/solana/package.json: Language not supported
  • packages/adapters/wagmi/package.json: Language not supported
  • packages/appkit-utils/package.json: Language not supported

@@ -523,7 +523,9 @@ export class WagmiAdapter extends AdapterBlueprint {

const res = await connect(this.wagmiConfig, {
connector,
chainId: chainId ? Number(chainId) : undefined
chainId: chainId ? Number(chainId) : undefined,
// @ts-expect-error socialUri is needed for auth connector but not in wagmi types
Copy link
Preview

Copilot AI Apr 1, 2025

Choose a reason for hiding this comment

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

Consider updating the wagmi connector type definitions to include the 'socialUri' parameter rather than suppressing the TypeScript error.

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

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