Docs

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 [email protected] 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/[email protected] 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>
);
}