Learn about Phantom Connect: For details about authentication flows, login, account selection, and session management, see the Phantom Connect guide.
Using the Connect modal (recommended)
The SDK includes a built-in bottom sheet Connect modal that handles sign-in and wallet connection. Use theuseModal() hook to open it:
- Multiple sign-in options, including Google and Apple
- Built-in error handling and loading states
- Works across devices and environments
- Handles the full connection flow and returns a ready-to-use wallet session
- Presented as a bottom sheet optimized for mobile interaction
useConnect hook (manual connection)
Authentication providers
Theconnect() method accepts a provider parameter to specify how users should authenticate. Available providers are configured in the PhantomProvider config:
connect() method with one of the enabled providers:
Checking connection status
Use theuseAccounts hook to check if a wallet is already connected:
Handling connection errors
When a connection fails, theconnect() promise rejects with an error.