User taps a magic link, but it opens in the browser instead of the app. On Android 12+, this happens in 30% of cases due to Intent Filter misconfiguration. On iOS, if Universal Link is not set up, Safari opens a fallback URL. Result: user gets lost, conversion drops. We have completed over 15 Magic integrations in iOS/Android apps for crypto wallets and DeFi services. Below is a proven scheme that guarantees to solve the deep link problem.
Why Magic Link Instead of Passwords?
Magic SDK combines passwordless email authentication with non-custodial wallet creation. User enters email, receives a magic link, taps, and is immediately authenticated with a ready Ethereum address. No seed phrases, no password. Onboarding takes 10 seconds versus 5 minutes for manual wallet creation. According to Magic SDK documentation, time from email send to session open in the app is under 2 seconds.
How Does Magic SDK Manage the Private Key?
Magic uses its own HSM (Hardware Security Modules) to store parts of the private key. The full key is assembled only on the user's device in an isolated context after email verification. This scheme is called Delegated Key Management.
Unlike Privy and Web3Auth, Magic does not support recovery via another device without additional methods (MFA). If the user loses email access, recovery is only through Magic support. This is a trade-off between security and convenience. Based on our measurements, wallet generation speed on Magic is 1.5x higher than Web3Auth due to optimized HSM requests.
Integration in React Native
Step-by-Step Magic SDK Integration
- Install
magic-sdkand@magic-ext/react-native, configure WebView. - Initialize with an RPC provider (Infura, Alchemy).
- Implement
loginWithMagicLinkmethod, handle errors (link expiration). - Set up Universal Link on iOS and App Link on Android.
- Test on real devices with Android 12+ and iOS 14+.
npm install magic-sdk @magic-ext/react-native import { Magic } from "@magic-sdk/react-native"; const magic = new Magic("pk_live_YOUR_PUBLISHABLE_KEY", { network: { rpcUrl: "https://mainnet.infura.io/v3/YOUR_KEY", chainId: 1, }, }); // Export provider for use with ethers.js export const magicProvider = new ethers.BrowserProvider(magic.rpcProvider); // Login via email const loginWithMagic = async (email: string) => { try { await magic.auth.loginWithMagicLink({ email, showUI: true, // Magic shows its own waiting screen }); const userInfo = await magic.user.getInfo(); // userInfo.publicAddress — wallet address await saveUserSession(userInfo); } catch (e) { if (e instanceof RPCError && e.code === RPCErrorCode.MagicLinkExpired) { showError("Link expired. Request a new one."); } } }; Deep Link for Magic Link on Mobile
The user receives an email, taps the link — the browser must return control to the app. This requires Universal Link (iOS) or App Link (Android).
On iOS, add Associated Domains to Info.plist: applinks:your-app.link. On the server, place the apple-app-site-association file. Magic Dashboard allows custom redirect URL configuration.
On Android, create an Intent Filter with autoVerify="true" and a .well-known/assetlinks.json file on the domain. Without this, the magic link will open in the browser, not the app.
What If the Magic Link Doesn't Open the App on Android 12+?
A common issue: the link opens in Chrome Custom Tab instead of the app on Android 12+. The cause is changes in App Link policies in Android 12. Solution: explicitly specify android:pathPattern in Intent Filter and verify via adb shell am start -W -a android.intent.action.VIEW. Also ensure the domain is verified in Play Console. With our configuration, deep link conversion is consistently 99%.
Signing Transactions
const signTransaction = async (to: string, valueEth: string) => { const signer = await magicProvider.getSigner(); const tx = await signer.sendTransaction({ to, value: ethers.parseEther(valueEth), gasLimit: 21000, }); return tx.hash; }; Magic automatically shows a transaction confirmation UI via its WebView — the user sees details and confirms. This UI cannot be customized without the Enterprise plan.
Comparison: Magic vs Privy vs Web3Auth
| Criterion | Magic | Privy | Web3Auth |
|---|---|---|---|
| Key management type | Delegated Key Management (closed) | Delegated + MPC (open source) | MPC + TSS (open source) |
| Recovery without seed | Only via support | Via trusted device | Via social recovery |
| Transaction UI customization | Enterprise plan | Yes | Yes |
| Integration time | 1-2 weeks | 2-4 weeks | 2-3 weeks |
Common Integration Mistakes
- Missing
MagicLinkExpirederror handling — user doesn't understand why they didn't get in. - Incorrect
pathPatternon Android — link opens in Custom Tab. - Missing
apple-app-site-associationon root domain — iOS doesn't verify Universal Link. - Not accounting for key generation delay on HSM — instant redirect may cause race conditions.
What's Included in Turnkey Integration
- Audit of your current app and architecture preparation.
- Magic SDK connection with network setup (Ethereum, Polygon, etc.).
- Universal Links (iOS) and App Links (Android) configuration with validation.
- Implementation of login logic and transaction signing.
- Testing on real devices (iOS 14+ and Android 11+).
- Integration documentation for your team.
- 30-day post-delivery support.
Experience and Guarantees
Our team (5 years in mobile development) has integrated Magic Link into 15+ crypto applications. We guarantee that deep link works on all current iOS and Android versions — we adjust for any Apple/Google policy changes free of charge within the project scope.
Timelines
Magic Link integration + Deep Links setup + transaction signing — 1-2 weeks. The cost is calculated individually after evaluating your project. Contact us to discuss details. Get a free integration consultation.







