SocketFi brings embedded, passkey-secured Stellar/Soroban wallets to mobile — no seed phrases, no wallet apps, no browser extensions required. Authentication runs through a hosted SocketFi flow that opens in a secure in-app browser, then deep-links back to your app with a ready-to-use session. This guide walks you through every step from SDK installation to production-ready transaction handling.
Prerequisites
Before you begin, make sure you have:
- Expo SDK 53 or later
- React Native (managed or bare workflow)
- TypeScript (recommended)
- A SocketFi application and Client ID from the SocketFi Dashboard
Deep linking must be configured in app.json before authentication will work. The SocketFi hosted flow redirects back to your app via a custom URL scheme. Without it, the session cannot be delivered and authentication will hang.
Recommended project structure
Production tips
- Test on physical devices. Passkey prompts and deep-link callbacks behave differently in simulators. Always validate your auth and transaction flows on real iOS and Android hardware before shipping.
- Test on both iOS and Android. Deep-link handling has platform-specific edge cases — cover both in your QA pass.
- Handle offline gracefully. Mobile devices lose connectivity frequently. Detect the network state and disable transaction requests when offline rather than letting them fail silently.
- Verify tokens server-side. Use
@socketfi/server’s verifyAuth() to validate socketfiAccessToken in your API before granting access to protected resources.
- Monitor authentication and transaction failures. Pipe
onError events to your crash/observability provider so you can detect regressions in the auth flow after updates.