Magic Link

Add Magic's dependencies

The @magic-sdk has a few dependencies you need to add to your app before using the SDK in React Native. For convenience you can run:

npm i react-native-safe-area-context@4.5.3 react-native-webview react-native-device-info

which will install the following dependencies:

You also need a Magic api-key to pass it as part of the wallet config.

Using the new wallet

NOTE: magicWallet has been deprecated starting in version @thirdweb-dev/react-native@0.2.49 in favor of magicLink for consistency with our React SDK.

We suggest you add magicLink as the first wallet in your supportedWallets list since the UI for it is a TextInput field:

import { Goerli } from "@thirdweb-dev/chains";
import {
ThirdwebProvider,
magicLink,
metamaskWallet,
} from "@thirdweb-dev/react-native";
function AppWithProviders() {
return (
<ThirdwebProvider
clientId="your-client-id"
activeChain={Goerli}
supportedWallets={[
magicLink({
apiKey: "magic_api_key",
}),
metamaskWallet(),
]}
>
<App />
</ThirdwebProvider>
);
}