js
js copied to clipboard
[thirdweb]: port phone auth to v5
Problem solved
Adds phone authentication to embedded wallet in thirdweb
Changes made
- [ ] Public API changes:
import { createThirdwebClient } from "thirdweb";
import { preAuthenticate, connectEmbeddedWallet } from "thirdweb/wallets/embedded";
// phone number with country code, no spaces
const phoneNumber = "+11234567890";
const client = createThirdwebClient({ clientId: "Your client ID" });
await preAuthenticate({
strategy: "phone",
phoneNumber,
client,
});
const [wallet, chain] = await connectEmbeddedWallet({
strategy: "phone";
phoneNumber,
verificationCode: "SMS_CODE_HERE"
});
- [ ] Internal API changes: Adds internall handler to send and verify phone sms otp
How to test
- [ ] Automated tests: None
- [ ] Manual tests: release pr and test on local branch
PR-Codex overview
This PR adds phone authentication support to embedded wallets.
Detailed summary
- Added phone authentication method for embedded wallets
- Updated authentication types to include phone number
- Implemented sending and verifying SMS login OTP
- Updated user authentication functions to support phone numbers
✨ Ask PR-Codex anything about this PR by commenting with
/codex {your question}
🦋 Changeset detected
Latest commit: 437fcc6bb9a7b97d7865448ec9de8ff009b78d08
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/react | Patch |
@thirdweb-dev/sdk | Patch |
@thirdweb-dev/cli | Patch |
@thirdweb-dev/react-core | Patch |
@thirdweb-dev/react-native | 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
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 76.98%. Comparing base (
3be61dd
) to head (437fcc6
).
Additional details and impacted files
@@ Coverage Diff @@
## main #2679 +/- ##
=======================================
Coverage 76.97% 76.98%
=======================================
Files 560 560
Lines 32368 32368
Branches 2832 2831 -1
=======================================
+ Hits 24916 24917 +1
Misses 6787 6787
+ Partials 665 664 -1
Flag | Coverage Δ | |
---|---|---|
legacy_packages | 65.66% <ø> (+<0.01%) |
:arrow_up: |
packages | 82.76% <ø> (ø) |
CodSpeed Performance Report
Merging #2679 will not alter performance
Comparing winston/port-phone-auth-to-v5
(437fcc6) with main
(3be61dd)
Summary
✅ 9
untouched benchmarks
size-limit report 📦
Path | Size | Loading time (3g) | Running time (snapdragon) | Total time |
---|---|---|---|---|
thirdweb (esm) | 38.54 KB (0%) | 771 ms (0%) | 127 ms (+39.91% 🔺) | 898 ms |
thirdweb (cjs) | 85.95 KB (0%) | 1.8 s (0%) | 349 ms (+113.88% 🔺) | 2.1 s |
thirdweb (minimal + tree-shaking) | 4.7 KB (0%) | 95 ms (0%) | 106 ms (+2087.52% 🔺) | 200 ms |
thirdweb/chains (tree-shaking) | 387 B (0%) | 10 ms (0%) | 31 ms (+873.57% 🔺) | 41 ms |
thirdweb/react (minimal + tree-shaking) | 9.95 KB (0%) | 199 ms (0%) | 30 ms (+276.28% 🔺) | 229 ms |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
/release-pr
/release-pr
/release-pr