Skip to content

fix(core): attribute social and email logins to the app's project id - #583

Merged
skibitsky merged 3 commits into
developfrom
fix/social-login-project-id
Sep 6, 2026
Merged

fix(core): attribute social and email logins to the app's project id#583
skibitsky merged 3 commits into
developfrom
fix/social-login-project-id

Conversation

@skibitsky

Copy link
Copy Markdown
Member

Adds the app's projectId to the Web Wallet URL opened for social/email login, so those logins are attributed to the app rather than to the Web Wallet's own project. Also encodes the query parameter values. Third-party wallet deep links are unchanged.

Ports reown-com/reown-dotnet#335.

yarn test in packages/core and packages/appkit: passing.

🤖 Generated with Claude Code

Social and email login opens the Reown Web Wallet in the system browser,
and the Web Wallet only knows its own project id — so every login started
from an app was attributed to it instead of to the app. Send the app's
project id along as a projectId query parameter on that URL, and encode
the query parameter values. Deep links to third-party wallets are
unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4e18ff9

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

This PR includes changesets to release 9 packages
Name Type
@reown/appkit-react-native Patch
@reown/appkit-bitcoin-react-native Patch
@reown/appkit-coinbase-react-native Patch
@reown/appkit-common-react-native Patch
@reown/appkit-core-react-native Patch
@reown/appkit-ethers-react-native Patch
@reown/appkit-solana-react-native Patch
@reown/appkit-ui-react-native Patch
@reown/appkit-wagmi-react-native 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

@claude

claude Bot commented Sep 2, 2026

Copy link
Copy Markdown

Claude finished @skibitsky's task in 1m 48s —— View job


Code Review

  • Read changed files
  • Analyze diff
  • Breaking changes subagent: no issues
  • Data classification subagent: no issues

Found 1 issue(s)

Issue 1: Encoding test uses values that don't need encoding

ID: corehelperutil-test-encoding-coverage-a3b1
File: packages/core/src/tests/utils/CoreHelperUtil.test.ts:21
Severity: LOW
Category: test-coverage

Context:

  • Pattern: The "encoded provider" test uses 'google' as the provider — encodeURIComponent('google') === 'google', so the assertion passes regardless of whether encoding is applied.
  • Risk: If encodeURIComponent were accidentally removed from the provider append, the test would still pass.
  • Impact: Encoding behavior for special-character values is unverified.
  • Trigger: A provider value (or projectId) containing +, =, &, #, etc. would produce a malformed URL undetected by tests.

Recommendation:

it('should URL-encode special characters in provider', () => {
  OptionsController.setProjectId('proj+id=1');
  const { redirect } = CoreHelperUtil.formatUniversalUrl(WEB_WALLET_URL, WC_URI, 'email+test' as SocialProvider);
  expect(redirect).toContain('provider=email%2Btest');
  expect(redirect).toContain('projectId=proj%2Bid%3D1');
});

✅ No breaking changes. ✅ No data classification issues. The core fix (appending projectId and encoding both params) is correct and well-scoped — only the provider path is affected, third-party wallet deep links are untouched.

Comment thread packages/core/src/__tests__/utils/CoreHelperUtil.test.ts
The previous assertions used values that encode to themselves, so they
passed whether or not encoding was applied.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread .changeset/social-login-project-id.md Outdated
Co-authored-by: Ignacio Santise <25931366+ignaciosantise@users.noreply.github.com>
@skibitsky
skibitsky merged commit f833414 into develop Sep 6, 2026
9 checks passed
@skibitsky
skibitsky deleted the fix/social-login-project-id branch September 6, 2026 09:13
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants