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: add phone login for embedded wallet #2366

Merged
merged 36 commits into from
Apr 8, 2024

Conversation

ElasticBottle
Copy link
Contributor

@ElasticBottle ElasticBottle commented Feb 28, 2024

Problem solved

Short description of the bug fixed or feature added

Changes made

  • Public API changes:
    embeddedWalletSdk.sendVerificationSms({ phoneNumber: "+11234567890" })
    embeddedWalletSdk.authenticate({ strategy: "phone_number_verification", verificationCode: "123456" })

  • Internal API changes: explain the internal logic changes

How to test

  • Automated tests: link to unit test file
  • Manual tests: step by step instructions on how to test

PR-Codex overview

This PR adds the option to log in with SMS in the EmbeddedWallet feature. It includes changes related to email and phone login options, SMS verification, and validation functions.

Detailed summary

  • Added SMS login option in EmbeddedWallet
  • Updated email and phone login options
  • Implemented SMS verification functionality
  • Added email validation function
  • Updated locale texts for email and phone login
  • Updated authentication parameters and methods for SMS verification

The following files were skipped due to too many changes: legacy_packages/wallets/src/evm/connectors/embedded-wallet/implementations/lib/auth/abstract-login.ts, legacy_packages/react/src/evm/locales/es.ts, legacy_packages/react/src/evm/locales/en.ts, legacy_packages/react/src/wallet/wallets/InputSelectionUI.tsx, legacy_packages/react/src/wallet/wallets/embeddedWallet/CountrySelector.tsx, legacy_packages/react/src/evm/hooks/wallets/useEmbeddedWallet.ts, legacy_packages/react/src/wallet/wallets/embeddedWallet/embeddedWallet.tsx, legacy_packages/wallets/src/evm/wallets/embedded-wallet.ts, legacy_packages/react/src/wallet/ConnectWallet/Details.tsx, legacy_packages/react/src/wallet/wallets/embeddedWallet/EmbeddedWalletFormUI.tsx, legacy_packages/react/src/wallet/wallets/embeddedWallet/EmbeddedWalletOTPLoginUI.tsx, legacy_packages/wallets/src/evm/connectors/embedded-wallet/implementations/lib/auth/supported-sms-countries.ts

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

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@ElasticBottle ElasticBottle requested a review from a team February 28, 2024 22:09
Copy link

changeset-bot bot commented Feb 28, 2024

🦋 Changeset detected

Latest commit: acded84

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

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

@ElasticBottle
Copy link
Contributor Author

/release-pr

@ElasticBottle ElasticBottle requested a review from a team as a code owner February 29, 2024 17:44
@MananTank
Copy link
Member

/release-pr

jnsdls and others added 2 commits March 20, 2024 10:49
…n/add-phone-auth-for-embedded-wallet
@ElasticBottle
Copy link
Contributor Author

/release-pr

Copy link

codecov bot commented Apr 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 38.29%. Comparing base (b1013fc) to head (acded84).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2366   +/-   ##
=======================================
  Coverage   38.29%   38.29%           
=======================================
  Files         775      775           
  Lines       55983    55983           
  Branches     2528     2528           
=======================================
  Hits        21438    21438           
  Misses      33887    33887           
  Partials      658      658           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.71% <ø> (ø) Carriedforward from b1013fc
packages 31.66% <ø> (ø) Carriedforward from b1013fc

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

@ElasticBottle
Copy link
Contributor Author

/release-pr

@ElasticBottle
Copy link
Contributor Author

/release-pr

@ElasticBottle
Copy link
Contributor Author

/release-pr

@ElasticBottle
Copy link
Contributor Author

/release-pr

@ElasticBottle
Copy link
Contributor Author

/release-pr

@ElasticBottle
Copy link
Contributor Author

/release-pr

ElasticBottle and others added 2 commits April 4, 2024 16:45
fix: phone otp validation
chore: update placeholder text
feat: allow phone / email to be shown first
chore: allow space dashes and parenthesis
@ElasticBottle
Copy link
Contributor Author

/release-pr

ElasticBottle and others added 3 commits April 4, 2024 16:57
Copy link
Member

@jnsdls jnsdls left a comment

Choose a reason for hiding this comment

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

couple of call outs and changes, let me know when I can re-review

@jnsdls jnsdls enabled auto-merge April 8, 2024 20:25
@jnsdls jnsdls added this pull request to the merge queue Apr 8, 2024
Merged via the queue into main with commit f6a30c0 Apr 8, 2024
12 checks passed
@jnsdls jnsdls deleted the winston/add-phone-auth-for-embedded-wallet branch April 8, 2024 23:11
@jnsdls jnsdls mentioned this pull request Apr 8, 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

3 participants