thirdweb-dev / js

Best in class web3 SDKs for Browser, Node and Mobile apps
https://thirdweb.com
Apache License 2.0
447 stars 361 forks source link

Feature Request: Natively Support MagicLink in React Native v5 SDK #4701

Open brien-crean opened 1 month ago

brien-crean commented 1 month ago

While attempting to upgrade our project to 0.74.5 we get a Gradle build error due to an older version of expo-application (5.8.3) which is installed as a dependency of @thirdweb-dev/react-native.

Is there a plan to update expo-application along with other outdated expo dependencies to support react native 0.74 and 0.75?

yarn.lock segment

"@thirdweb-dev/react-native@npm:latest":
  version: 0.8.0
  resolution: "@thirdweb-dev/react-native@npm:0.8.0"
  dependencies:
    "@aws-sdk/client-lambda": 3.549.0
    "@aws-sdk/credential-providers": 3.549.0
    "@coinbase/wallet-mobile-sdk": 1.0.13
    "@paperxyz/embedded-wallet-service-sdk": ^1.2.5
    "@shopify/restyle": ^2.4.2
    "@tanstack/react-query": ^4.36.1
    "@thirdweb-dev/chains": 0.1.106
    "@thirdweb-dev/react-core": 4.6.16
    "@thirdweb-dev/sdk": 4.0.77
    "@thirdweb-dev/storage": 2.0.14
    "@thirdweb-dev/wallets": 2.5.17
    abitype: 1.0.0
    amazon-cognito-identity-js: ^6.3.12
    aws-amplify: ^5.3.18
    expo-application: 5.8.3
    expo-clipboard: ^4.8.0
    expo-document-picker: ^11.10.1
    expo-file-system: ^16.0.8
    expo-secure-store: ^12.8.1
    react-native-aes-gcm-crypto: ^0.2.2
    react-native-camera: ^4.2.1
    react-native-inappbrowser-reborn: ^3.7.0
    react-native-modal: ^13.0.1
    react-native-quick-base64: ^2.1.0
    react-native-quick-crypto: ^0.6.1
    secrets.js-34r7h: ^2.0.2
    tiny-invariant: ^1.3.3
  peerDependencies:
    ethers: ">=5.5.1 <6"
    expo: ">=47"
    react: ">=18.0.0"
    react-native: ">=0.71.0"
    react-native-mmkv: ">=2.11.0"
    react-native-qrcode-svg: ">=6.3.0"
    react-native-svg: ">=15.1.0"
  dependenciesMeta:
    amazon-cognito-identity-js:
      optional: true
    react-native-aes-gcm-crypto:
      optional: true
    react-native-camera:
      optional: true
    react-native-inappbrowser-reborn:
      optional: true
    react-native-quick-base64:
      optional: true
    react-native-quick-crypto:
      optional: true
  checksum: 9f7002eeae4acf16f81b07e9b32102d861d88805287d1a931c292e8b1022486848b739134c74d9575508d935620e81b9330ff8465055032caa6b78bbc947480b
  languageName: node
  linkType: hard
jnsdls commented 1 month ago

hey @brien-crean, you have 2 options:

  1. use yarn resolutions to override the dependency version
  2. upgrade to thirdweb@5 react native docs react migration guide

I would HIGHLY recommend 2) but in a pinch / if u urgently need a solution 1) will do the trick

brien-crean commented 1 month ago

@jnsdls thanks for the quick reply! I tried option 1) but it seemed to create more dependency problems as we also use a few other thirdweb dependencies.

We use thirdweb for MetaMask login but we also created an AbstractClientWallet adapter to connect to magic-link hence these extra dependencies below.

Is it still possible to connect to magic link with a custom wallet with v5? We have existing users that have magic link wallets back when thirdweb natively supported magiclink.

"@thirdweb-dev/chains": "0.1.72",
"@thirdweb-dev/react-core": "4.4.8",
"@thirdweb-dev/react-native": "0.7.5",
"@thirdweb-dev/react-native-compat": "0.7.5",
"@thirdweb-dev/wallets": "2.4.10",
brien-crean commented 1 month ago

@jnsdls can you confirm if it is still possible to connect to magic link with a custom wallet with v5? We have existing users that have magic link wallets back when thirdweb natively supported magiclink. Thanks!

brien-crean commented 3 weeks ago

@jnsdls can I use thirdweb@5 along with the account interface to login with a custom wallet such as magic link as per this comment?

Any help is much appreciated as this is blocking us from upgrading react native.

gregfromstl commented 1 week ago

Hey @brien-crean, sorry for the delay on this issue. We don't natively support MagicLink in v5, but we'd like to soon. I'll keep you updated as this feature gets built.