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
24 changes: 24 additions & 0 deletions .changeset/modern-eyes-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
'@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
---

Test version for social login improvements
77 changes: 77 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"mode": "exit",
"tag": "7f005fd744d7d75ca9c0ce920705ec7f95908dbe",
"initialVersions": {
"@apps/browser-extension": "1.0.0",
"@apps/builder": "1.1.7",
"@apps/gallery": "1.5.2",
"@apps/laboratory": "1.5.1",
"@examples/html-ak-basic": "1.2.0",
"@examples/html-ak-basic-sign-client": "1.2.0",
"@examples/html-ak-basic-up": "1.2.0",
"@examples/html-bitcoin": "1.2.0",
"@examples/html-ep": "1.2.0",
"@examples/html-ethers": "1.2.0",
"@examples/html-solana": "1.2.0",
"@examples/html-wagmi": "1.2.0",
"@examples/html-wagmi-cdn": "1.2.0",
"@examples/html-wagmi-solana-bitcoin": "1.2.0",
"@examples/html-wagmi-wallet-button": "1.2.0",
"@examples/next-ak-basic-app-router": "1.0.5",
"@examples/next-ak-basic-sign-client-app-router": "1.0.5",
"@examples/next-ak-basic-up-app-router": "1.0.5",
"@examples/next-bitcoin-app-router": "1.0.5",
"@examples/next-ep-app-router": "1.0.5",
"@examples/next-ethers-app-router": "1.0.5",
"@examples/next-wagmi-app-router": "1.0.5",
"@examples/next-wagmi-solana-bitcoin-app-router": "1.0.5",
"@examples/parcel-react-wagmi": "1.0.0",
"@examples/react-ak-basic": "1.2.0",
"@examples/react-ak-basic-sign-client": "1.2.0",
"@examples/react-ak-basic-up": "1.2.0",
"@examples/react-ep": "1.2.0",
"@examples/react-ethers": "1.2.0",
"@examples/react-ethers5": "1.2.0",
"@examples/react-solana": "1.2.0",
"@examples/react-wagmi": "1.2.0",
"@examples/sveltekit-4-wagmi": "0.0.1",
"@examples/sveltekit-ethers": "0.0.1",
"@examples/sveltekit-wagmi": "0.0.1",
"@examples/vue-ak-basic": "1.2.0",
"@examples/vue-ak-basic-sign-client": "1.2.0",
"@examples/vue-ak-basic-up": "1.2.0",
"@examples/vue-ep": "1.2.0",
"@examples/vue-ethers-solana": "1.2.0",
"@examples/vue-ethers5": "1.2.0",
"@examples/vue-solana": "1.2.0",
"@examples/vue-wagmi": "1.2.0",
"@examples/vue-wagmi-solana": "1.2.0",
"@reown/appkit-adapter-bitcoin": "1.7.1",
"@reown/appkit-adapter-ethers": "1.7.1",
"@reown/appkit-adapter-ethers5": "1.7.1",
"@reown/appkit-adapter-polkadot": "1.5.2",
"@reown/appkit-adapter-solana": "1.7.1",
"@reown/appkit-adapter-wagmi": "1.7.1",
"@reown/appkit": "1.7.1",
"@reown/appkit-utils": "1.7.1",
"@reown/appkit-cdn": "1.7.1",
"@reown/appkit-cli": "1.7.1",
"@reown/appkit-common": "1.7.1",
"@reown/appkit-controllers": "1.7.1",
"@reown/appkit-core": "1.7.1",
"@reown/appkit-experimental": "1.7.1",
"@reown/appkit-polyfills": "1.7.1",
"@reown/appkit-scaffold-ui": "1.7.1",
"@reown/appkit-siwe": "1.7.1",
"@reown/appkit-siwx": "1.7.1",
"@reown/appkit-ui": "1.7.1",
"@reown/appkit-ui-new": "1.4.1",
"@reown/appkit-wallet": "1.7.1",
"@reown/appkit-wallet-button": "1.7.1"
},
"changesets": [
"fancy-falcons-knock",
"modern-eyes-smash",
"tame-views-fall"
]
}
16 changes: 16 additions & 0 deletions packages/adapters/bitcoin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @reown/appkit-adapter-bitcoin

## 1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0

### Patch Changes

- [#4091](https://github.com/reown-com/appkit/pull/4091) [`1fc664d`](https://github.com/reown-com/appkit/commit/1fc664db6b109ac2ce9c66aec31a3ae2d6419589) Thanks [@magiziz](https://github.com/magiziz)! - Fixed an issue where the WalletConnect wallet button wasn't opening the "All Wallets" modal view on mobile devices

- Test version for social login improvements

- [#4094](https://github.com/reown-com/appkit/pull/4094) [`af1e79a`](https://github.com/reown-com/appkit/commit/af1e79a76d32def90c9605dc8e53a2ade002033c) Thanks [@magiziz](https://github.com/magiziz)! - Fixed an issue where users were required to re-check the legal checkbox after navigating away and returning to the connect view

- Updated dependencies [[`1fc664d`](https://github.com/reown-com/appkit/commit/1fc664db6b109ac2ce9c66aec31a3ae2d6419589), [`af1e79a`](https://github.com/reown-com/appkit/commit/af1e79a76d32def90c9605dc8e53a2ade002033c)]:
- @reown/[email protected]
- @reown/[email protected]
- @reown/[email protected]
- @reown/appkit-controllers@1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0

## 1.7.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/adapters/bitcoin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reown/appkit-adapter-bitcoin",
"version": "1.7.1",
"version": "1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0",
"sideEffects": false,
"type": "module",
"main": "./dist/esm/exports/index.js",
Expand Down
19 changes: 19 additions & 0 deletions packages/adapters/ethers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# @reown/appkit-adapter-ethers

## 1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0

### Patch Changes

- [#4091](https://github.com/reown-com/appkit/pull/4091) [`1fc664d`](https://github.com/reown-com/appkit/commit/1fc664db6b109ac2ce9c66aec31a3ae2d6419589) Thanks [@magiziz](https://github.com/magiziz)! - Fixed an issue where the WalletConnect wallet button wasn't opening the "All Wallets" modal view on mobile devices

- Test version for social login improvements

- [#4094](https://github.com/reown-com/appkit/pull/4094) [`af1e79a`](https://github.com/reown-com/appkit/commit/af1e79a76d32def90c9605dc8e53a2ade002033c) Thanks [@magiziz](https://github.com/magiziz)! - Fixed an issue where users were required to re-check the legal checkbox after navigating away and returning to the connect view

- Updated dependencies [[`1fc664d`](https://github.com/reown-com/appkit/commit/1fc664db6b109ac2ce9c66aec31a3ae2d6419589), [`af1e79a`](https://github.com/reown-com/appkit/commit/af1e79a76d32def90c9605dc8e53a2ade002033c)]:
- @reown/[email protected]
- @reown/[email protected]
- @reown/[email protected]
- @reown/appkit-controllers@1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0
- @reown/appkit-polyfills@1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0
- @reown/appkit-scaffold-ui@1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0
- @reown/[email protected]

## 1.7.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/adapters/ethers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reown/appkit-adapter-ethers",
"version": "1.7.1",
"version": "1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0",
"sideEffects": false,
"type": "module",
"main": "./dist/esm/src/index.js",
Expand Down
6 changes: 4 additions & 2 deletions packages/adapters/ethers/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,8 @@ export class EthersAdapter extends AdapterBlueprint {
public async connect({
id,
type,
chainId
chainId,
socialUri
}: AdapterBlueprint.ConnectParams): Promise<AdapterBlueprint.ConnectResult> {
const connector = this.connectors.find(c => c.id === id)
const selectedProvider = connector?.provider as Provider
Expand All @@ -350,7 +351,8 @@ export class EthersAdapter extends AdapterBlueprint {
if (type === 'AUTH') {
const { address } = await (selectedProvider as unknown as W3mFrameProvider).connect({
chainId,
preferredAccountType: OptionsController.state.defaultAccountTypes.eip155
preferredAccountType: OptionsController.state.defaultAccountTypes.eip155,
socialUri
})

accounts = [address]
Expand Down
19 changes: 19 additions & 0 deletions packages/adapters/ethers5/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# @reown/appkit-adapter-ethers5

## 1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0

### Patch Changes

- [#4091](https://github.com/reown-com/appkit/pull/4091) [`1fc664d`](https://github.com/reown-com/appkit/commit/1fc664db6b109ac2ce9c66aec31a3ae2d6419589) Thanks [@magiziz](https://github.com/magiziz)! - Fixed an issue where the WalletConnect wallet button wasn't opening the "All Wallets" modal view on mobile devices

- Test version for social login improvements

- [#4094](https://github.com/reown-com/appkit/pull/4094) [`af1e79a`](https://github.com/reown-com/appkit/commit/af1e79a76d32def90c9605dc8e53a2ade002033c) Thanks [@magiziz](https://github.com/magiziz)! - Fixed an issue where users were required to re-check the legal checkbox after navigating away and returning to the connect view

- Updated dependencies [[`1fc664d`](https://github.com/reown-com/appkit/commit/1fc664db6b109ac2ce9c66aec31a3ae2d6419589), [`af1e79a`](https://github.com/reown-com/appkit/commit/af1e79a76d32def90c9605dc8e53a2ade002033c)]:
- @reown/[email protected]
- @reown/[email protected]
- @reown/[email protected]
- @reown/appkit-controllers@1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0
- @reown/appkit-polyfills@1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0
- @reown/appkit-scaffold-ui@1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0
- @reown/[email protected]

## 1.7.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/adapters/ethers5/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reown/appkit-adapter-ethers5",
"version": "1.7.1",
"version": "1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0",
"sideEffects": false,
"type": "module",
"main": "./dist/esm/src/index.js",
Expand Down
6 changes: 4 additions & 2 deletions packages/adapters/ethers5/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,8 @@ export class Ethers5Adapter extends AdapterBlueprint {
public async connect({
id,
type,
chainId
chainId,
socialUri
}: AdapterBlueprint.ConnectParams): Promise<AdapterBlueprint.ConnectResult> {
const connector = this.connectors.find(c => c.id === id)
const selectedProvider = connector?.provider as Provider
Expand All @@ -349,7 +350,8 @@ export class Ethers5Adapter extends AdapterBlueprint {
if (type === 'AUTH') {
const { address } = await (selectedProvider as unknown as W3mFrameProvider).connect({
chainId,
preferredAccountType: OptionsController.state.defaultAccountTypes.eip155
preferredAccountType: OptionsController.state.defaultAccountTypes.eip155,
socialUri
})

accounts = [address]
Expand Down
18 changes: 18 additions & 0 deletions packages/adapters/solana/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @reown/appkit-adapter-solana

## 1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0

### Patch Changes

- [#4091](https://github.com/reown-com/appkit/pull/4091) [`1fc664d`](https://github.com/reown-com/appkit/commit/1fc664db6b109ac2ce9c66aec31a3ae2d6419589) Thanks [@magiziz](https://github.com/magiziz)! - Fixed an issue where the WalletConnect wallet button wasn't opening the "All Wallets" modal view on mobile devices

- Test version for social login improvements

- [#4094](https://github.com/reown-com/appkit/pull/4094) [`af1e79a`](https://github.com/reown-com/appkit/commit/af1e79a76d32def90c9605dc8e53a2ade002033c) Thanks [@magiziz](https://github.com/magiziz)! - Fixed an issue where users were required to re-check the legal checkbox after navigating away and returning to the connect view

- Updated dependencies [[`1fc664d`](https://github.com/reown-com/appkit/commit/1fc664db6b109ac2ce9c66aec31a3ae2d6419589), [`af1e79a`](https://github.com/reown-com/appkit/commit/af1e79a76d32def90c9605dc8e53a2ade002033c)]:
- @reown/[email protected]
- @reown/[email protected]
- @reown/[email protected]
- @reown/appkit-controllers@1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0
- @reown/appkit-polyfills@1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0
- @reown/[email protected]

## 1.7.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/adapters/solana/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reown/appkit-adapter-solana",
"version": "1.7.1",
"version": "1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0",
"sideEffects": false,
"type": "module",
"main": "./dist/esm/src/index.js",
Expand Down
3 changes: 2 additions & 1 deletion packages/adapters/solana/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ export class SolanaAdapter extends AdapterBlueprint<SolanaProvider> {
}

const address = await connector.connect({
chainId: params.chainId as string
chainId: params.chainId as string,
socialUri: params.socialUri
})
this.listenProviderEvents(connector)

Expand Down
5 changes: 3 additions & 2 deletions packages/adapters/solana/src/providers/AuthProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ export class AuthProvider extends ProviderEventEmitter implements SolanaProvider
)
}

public async connect(params: { chainId?: string } = {}) {
public async connect(params: { chainId?: string; socialUri?: string } = {}) {
const chainId = params.chainId || this.getActiveChain()?.id
await this.provider.connect({
chainId: withSolanaNamespace(chainId)
chainId: withSolanaNamespace(chainId),
socialUri: params.socialUri
})

if (!this.publicKey) {
Expand Down
19 changes: 19 additions & 0 deletions packages/adapters/wagmi/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# @reown/appkit-adapter-wagmi

## 1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0

### Patch Changes

- [#4091](https://github.com/reown-com/appkit/pull/4091) [`1fc664d`](https://github.com/reown-com/appkit/commit/1fc664db6b109ac2ce9c66aec31a3ae2d6419589) Thanks [@magiziz](https://github.com/magiziz)! - Fixed an issue where the WalletConnect wallet button wasn't opening the "All Wallets" modal view on mobile devices

- Test version for social login improvements

- [#4094](https://github.com/reown-com/appkit/pull/4094) [`af1e79a`](https://github.com/reown-com/appkit/commit/af1e79a76d32def90c9605dc8e53a2ade002033c) Thanks [@magiziz](https://github.com/magiziz)! - Fixed an issue where users were required to re-check the legal checkbox after navigating away and returning to the connect view

- Updated dependencies [[`1fc664d`](https://github.com/reown-com/appkit/commit/1fc664db6b109ac2ce9c66aec31a3ae2d6419589), [`af1e79a`](https://github.com/reown-com/appkit/commit/af1e79a76d32def90c9605dc8e53a2ade002033c)]:
- @reown/[email protected]
- @reown/[email protected]
- @reown/[email protected]
- @reown/appkit-controllers@1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0
- @reown/appkit-polyfills@1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0
- @reown/appkit-scaffold-ui@1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0
- @reown/[email protected]

## 1.7.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/adapters/wagmi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reown/appkit-adapter-wagmi",
"version": "1.7.1",
"version": "1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0",
"sideEffects": false,
"type": "module",
"main": "./dist/esm/src/index.js",
Expand Down
6 changes: 4 additions & 2 deletions packages/adapters/wagmi/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ export class WagmiAdapter extends AdapterBlueprint {
public async connect(
params: AdapterBlueprint.ConnectParams
): Promise<AdapterBlueprint.ConnectResult> {
const { id, provider, type, info, chainId } = params
const { id, provider, type, info, chainId, socialUri } = params
const connector = this.getWagmiConnector(id)

if (!connector) {
Expand All @@ -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 uses AI. Check for mistakes.

socialUri
})

return {
Expand Down
7 changes: 5 additions & 2 deletions packages/adapters/wagmi/src/connectors/AuthConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ export function authConnector(parameters: AuthParameters) {
type: 'AUTH',
chain: CommonConstantsUtil.CHAIN.EVM,

async connect(options = {}) {
async connect(
options: { chainId?: number; isReconnecting?: boolean; socialUri?: string } = {}
) {
const provider = await this.getProvider()
let chainId = options.chainId

Expand All @@ -58,7 +60,8 @@ export function authConnector(parameters: AuthParameters) {
accounts
} = await provider.connect({
chainId,
preferredAccountType: OptionsController.state.defaultAccountTypes.eip155
preferredAccountType: OptionsController.state.defaultAccountTypes.eip155,
socialUri: options.socialUri
})

currentAccounts = accounts?.map(a => a.address as Address) || [address as Address]
Expand Down
16 changes: 16 additions & 0 deletions packages/appkit-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @reown/appkit-utils

## 1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0

### Patch Changes

- [#4091](https://github.com/reown-com/appkit/pull/4091) [`1fc664d`](https://github.com/reown-com/appkit/commit/1fc664db6b109ac2ce9c66aec31a3ae2d6419589) Thanks [@magiziz](https://github.com/magiziz)! - Fixed an issue where the WalletConnect wallet button wasn't opening the "All Wallets" modal view on mobile devices

- Test version for social login improvements

- [#4094](https://github.com/reown-com/appkit/pull/4094) [`af1e79a`](https://github.com/reown-com/appkit/commit/af1e79a76d32def90c9605dc8e53a2ade002033c) Thanks [@magiziz](https://github.com/magiziz)! - Fixed an issue where users were required to re-check the legal checkbox after navigating away and returning to the connect view

- Updated dependencies [[`1fc664d`](https://github.com/reown-com/appkit/commit/1fc664db6b109ac2ce9c66aec31a3ae2d6419589), [`af1e79a`](https://github.com/reown-com/appkit/commit/af1e79a76d32def90c9605dc8e53a2ade002033c)]:
- @reown/[email protected]
- @reown/appkit-controllers@1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0
- @reown/appkit-polyfills@1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0
- @reown/[email protected]

## 1.7.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/appkit-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reown/appkit-utils",
"version": "1.7.1",
"version": "1.7.2-7f005fd744d7d75ca9c0ce920705ec7f95908dbe.0",
"sideEffects": false,
"type": "module",
"main": "./dist/esm/exports/index.js",
Expand Down
Loading