js icon indicating copy to clipboard operation
js copied to clipboard

feat(react): initial auth for `<ConnectButton />`

Open jnsdls opened this issue 1 year ago • 11 comments

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}

jnsdls avatar Apr 17 '24 02:04 jnsdls

🦋 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

changeset-bot[bot] avatar Apr 17 '24 02:04 changeset-bot[bot]

requires UI work, but is functional as is!

jnsdls avatar Apr 17 '24 02:04 jnsdls

CodSpeed Performance Report

Merging #2793 will not alter performance

Comparing CNCT-934 (bfabd5b) with main (4eb6283)

Summary

✅ 9 untouched benchmarks

codspeed-hq[bot] avatar Apr 17 '24 02:04 codspeed-hq[bot]

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

github-actions[bot] avatar Apr 17 '24 02:04 github-actions[bot]

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.

codecov[bot] avatar Apr 17 '24 02:04 codecov[bot]

/release-pr

jnsdls avatar Apr 17 '24 02:04 jnsdls

/release-pr

jnsdls avatar Apr 18 '24 07:04 jnsdls

@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

jnsdls avatar Apr 18 '24 08:04 jnsdls

/release-pr

jnsdls avatar Apr 19 '24 06:04 jnsdls