feat(react): initial auth for `<ConnectButton />`
closes: CNCT-934, CNCT-906
PR-Codex overview
This PR adds SIWE (Sign in with Ethereum) authentication support to the ConnectButton and ConnectEmbed components.
Detailed summary
- Added SIWE auth options for login payload, login, and logout
- Updated components to support SIWE authentication flow
- Added necessary types for SIWE authentication
- Updated documentation with SIWE auth details
The following files were skipped due to too many changes:
packages/thirdweb/src/react/core/hooks/auth/useSiweAuth.ts,packages/thirdweb/src/react/web/ui/ConnectWallet/ConnectWallet.tsx,packages/thirdweb/src/react/web/ui/ConnectWallet/screens/SignatureScreen.tsx
✨ Ask PR-Codex anything about this PR by commenting with
/codex {your question}
🦋 Changeset detected
Latest commit: bfabd5b9a97d943aff839648d469a7cfff2be5f5
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 10 packages
| Name | Type |
|---|---|
| thirdweb | Minor |
| @thirdweb-dev/sdk | Patch |
| @thirdweb-dev/cli | Patch |
| @thirdweb-dev/react-core | Patch |
| @thirdweb-dev/react-native | Patch |
| @thirdweb-dev/react | Patch |
| @thirdweb-dev/unity-js-bridge | Patch |
| @thirdweb-dev/wallets | Patch |
| @thirdweb-dev/auth | Patch |
| @thirdweb-dev/react-native-compat | 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
requires UI work, but is functional as is!
CodSpeed Performance Report
Merging #2793 will not alter performance
Comparing CNCT-934 (bfabd5b) with main (4eb6283)
Summary
✅ 9 untouched benchmarks
size-limit report 📦
| Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
|---|---|---|---|---|
| thirdweb (esm) | 38.6 KB (0%) | 772 ms (0%) | 3.5 s (+9.11% 🔺) | 4.3 s |
| thirdweb (cjs) | 86.04 KB (0%) | 1.8 s (0%) | 7.5 s (-15.3% 🔽) | 9.2 s |
| thirdweb (minimal + tree-shaking) | 4.7 KB (0%) | 95 ms (0%) | 659 ms (+227.74% 🔺) | 753 ms |
| thirdweb/chains (tree-shaking) | 387 B (0%) | 10 ms (0%) | 122 ms (+70.43% 🔺) | 131 ms |
| thirdweb/react (minimal + tree-shaking) | 9.95 KB (0%) | 199 ms (0%) | 299 ms (-63.76% 🔽) | 498 ms |
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 76.96%. Comparing base (
4eb6283) to head (bfabd5b).
Additional details and impacted files
@@ Coverage Diff @@
## main #2793 +/- ##
=======================================
Coverage 76.96% 76.96%
=======================================
Files 560 560
Lines 32366 32366
Branches 2829 2831 +2
=======================================
Hits 24911 24911
Misses 6790 6790
Partials 665 665
| Flag | Coverage Δ | *Carryforward flag | |
|---|---|---|---|
| legacy_packages | 65.65% <ø> (ø) |
Carriedforward from 9102062 | |
| packages | 82.74% <ø> (ø) |
*This pull request uses carry forward flags. Click here to find out more.
/release-pr
/release-pr
@MananTank in my testing just now when connecting wallet the signup screen does not show immediately after connecting and instead it falls back to the "welcome" screen behavior
EDIT: I've fixed it
/release-pr