Skip to content
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

feat: passkey support for in-app wallets #2912

Merged
merged 46 commits into from May 14, 2024
Merged

Conversation

joaquim-verges
Copy link
Contributor

@joaquim-verges joaquim-verges commented May 2, 2024

PR-Codex overview

The focus of this PR is to update the Connect Modal UI and add Passkey support.

Detailed summary

  • Added Passkey support as an authentication option for inAppWallet
  • Updated the Connect UI component UI
  • Updated various text and icon placeholders
  • Updated button styles and layout
  • Added Passkey credential storage functionality

The following files were skipped due to too many changes: packages/thirdweb/src/react/web/wallets/in-app/CountrySelector.tsx, packages/thirdweb/src/react/web/ui/design-system/index.ts, packages/thirdweb/src/utils/domains.ts, packages/thirdweb/src/react/web/ui/components/formElements.tsx, packages/thirdweb/src/react/web/wallets/in-app/InputSelectionUI.tsx, packages/thirdweb/src/react/web/wallets/in-app/InAppWalletConnectUI.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/icons/FingerPrintIcon.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/WalletSelector.tsx, packages/thirdweb/src/wallets/custom/inApp/image.ts, packages/thirdweb/src/wallets/in-app/implementations/lib/auth/passkeys.ts, packages/thirdweb/src/react/web/wallets/in-app/InAppWalletFormUI.tsx, packages/thirdweb/src/react/web/wallets/in-app/InAppWalletPassKeyLogin.tsx, packages/thirdweb/src/react/web/ui/ConnectWallet/icons/dataUris.ts

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@joaquim-verges joaquim-verges added the DO NOT MERGE not ready to be merged yet label May 2, 2024
Copy link

changeset-bot bot commented May 2, 2024

🦋 Changeset detected

Latest commit: 635df57

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

This PR includes changesets to release 8 packages
Name Type
thirdweb Minor
@thirdweb-dev/sdk Patch
@thirdweb-dev/cli Patch
@thirdweb-dev/react-core Patch
@thirdweb-dev/react Patch
@thirdweb-dev/unity-js-bridge Patch
@thirdweb-dev/wallets Patch
@thirdweb-dev/auth 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

socket-security bot commented May 2, 2024

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@passwordless-id/webauthn@1.6.1 network 0 3.55 MB dagnelies

View full report↗︎

Copy link

codspeed-hq bot commented May 2, 2024

CodSpeed Performance Report

Merging #2912 will improve performances by 16.77%

Comparing joaquim/iaw_passkeys (635df57) with main (145ff48)

Summary

⚡ 1 improvements
✅ 8 untouched benchmarks

Benchmarks breakdown

Benchmark main joaquim/iaw_passkeys Change
keccakId 8.4 ms 7.2 ms +16.77%

Copy link
Contributor

github-actions bot commented May 2, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 39.11 KB (+0.12% 🔺) 783 ms (+0.12% 🔺) 519 ms (+20.26% 🔺) 1.4 s
thirdweb (cjs) 87.96 KB (+0.13% 🔺) 1.8 s (+0.13% 🔺) 1.3 s (+31.74% 🔺) 3.1 s
thirdweb (minimal + tree-shaking) 4.73 KB (+0.3% 🔺) 95 ms (+0.3% 🔺) 120 ms (+244.83% 🔺) 215 ms
thirdweb/chains (tree-shaking) 400 B (0%) 10 ms (0%) 28 ms (+236.89% 🔺) 38 ms
thirdweb/react (minimal + tree-shaking) 16.42 KB (+0.28% 🔺) 329 ms (+0.28% 🔺) 152 ms (+50.95% 🔺) 481 ms

Copy link

codecov bot commented May 2, 2024

Codecov Report

Attention: Patch coverage is 45.00000% with 66 lines in your changes are missing coverage. Please review.

Project coverage is 64.66%. Comparing base (c429991) to head (635df57).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2912      +/-   ##
==========================================
+ Coverage   64.62%   64.66%   +0.04%     
==========================================
  Files         759      759              
  Lines       53052    53068      +16     
  Branches     3097     3100       +3     
==========================================
+ Hits        34285    34317      +32     
+ Misses      18101    18086      -15     
+ Partials      666      665       -1     
Flag Coverage Δ *Carryforward flag
legacy_packages 65.66% <ø> (+<0.01%) ⬆️ Carriedforward from a9fa7a6
packages 64.40% <45.00%> (+0.04%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

Files Coverage Δ
...b/src/react/web/ui/ConnectWallet/icons/dataUris.ts 100.00% <100.00%> (ø)
...s/thirdweb/src/react/web/ui/design-system/index.ts 90.87% <100.00%> (ø)
packages/thirdweb/src/utils/fetch.ts 77.09% <100.00%> (+0.25%) ⬆️
...ckages/thirdweb/src/wallets/smart/lib/constants.ts 100.00% <100.00%> (ø)
packages/thirdweb/src/wallets/smart/lib/userop.ts 79.74% <100.00%> (ø)
...ges/thirdweb/src/react/web/ui/components/basic.tsx 19.43% <0.00%> (ø)
...s/thirdweb/src/react/web/ui/components/buttons.tsx 48.17% <50.00%> (ø)
...irdweb/src/react/web/ui/components/WalletImage.tsx 24.21% <25.00%> (+0.21%) ⬆️
packages/thirdweb/src/utils/domains.ts 80.55% <63.15%> (-6.24%) ⬇️
...rdweb/src/react/web/ui/components/formElements.tsx 24.00% <0.00%> (-1.65%) ⬇️
... and 2 more

... and 3 files with indirect coverage changes

@MananTank
Copy link
Member

/release-pr

@MananTank
Copy link
Member

/release-pr

@joaquim-verges
Copy link
Contributor Author

/release-pr

@joaquim-verges joaquim-verges removed the DO NOT MERGE not ready to be merged yet label May 14, 2024
@joaquim-verges
Copy link
Contributor Author

/release-pr

1 similar comment
@joaquim-verges
Copy link
Contributor Author

/release-pr

setInputMode((prev) => (prev === "email" ? "phone" : "email"));
}, []);
const allowSwitchInputMode = isEmailEnabled && isPhoneEnabled;

const socialLogins = authOptions.filter(
Copy link
Member

Choose a reason for hiding this comment

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

Should we keep this and add !== passkey since we're more likely to add more social logins? (have heard Farcaster, X, and Discord mentioned)


triggered.current = true;
login();
});
Copy link
Member

Choose a reason for hiding this comment

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

Just checking is the missing dependency array intentional?

@joaquim-verges joaquim-verges added this pull request to the merge queue May 14, 2024
Merged via the queue into main with commit 9caa9d7 May 14, 2024
13 of 15 checks passed
@joaquim-verges joaquim-verges deleted the joaquim/iaw_passkeys branch May 14, 2024 19:44
@jnsdls jnsdls mentioned this pull request May 14, 2024
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.

None yet

5 participants