Providers
The SDK supports multiple authentication providers. Enable them per-screen via enabledProviders.
Available providers
Email / Password (SsoProvider.emailPassword)
Standard login and registration with email or phone, username, and password.
- Login with email, phone, or username + password
- Registration with email/phone + username + password
- Email and phone verification (6-digit code)
- Backup contact (email or phone) after verification
- Password reset flow
- No additional configuration needed
Google (SsoProvider.google)
Native Google Sign-In using the google_sign_in plugin.
- Requires iOS
CFBundleURLSchemesconfiguration (reversed client ID) - Android configuration via
google-services.json - No backend changes needed
Apple (SsoProvider.apple)
Native Apple Sign-In using the sign_in_with_apple plugin.
- iOS: native Apple Sign-In dialog
- Android: web-based fallback
- Backend requirement: add
noncefield in/apple/connectresponse
X / Twitter (SsoProvider.x)
OAuth 2.0 flow via in-app browser.
- Opens browser for X authentication
- Deep link callback to the app
- Backend requirement: support
redirect_uriparameter in/x/connect - Backend requirement: add Flutter deep link to callback whitelist
Telegram (SsoProvider.telegram)
OAuth flow via browser.
- Opens browser for Telegram authentication
- Deep link callback with token parsing
- Backend requirement: verify backend doesn't validate
originheader
Wallet (SsoProvider.wallet)
Blockchain wallet authentication (ETH, SOL, TON).
Requires walletConfig in SsoConfig and enabledWallets in authScreen().
// Init
await SsoSdk.initialize(SsoConfig(
baseUrl: '...',
origin: SsoOrigin.heroDev,
appName: 'MyApp',
appScheme: 'myapp', // Required for deep link callbacks
walletConfig: const SsoWalletConfig(
evm: SsoEvmWalletConfig(
projectId: 'your-project-id',
// universalLink: 'https://deeplinks.example.com/wc',
),
sol: SsoSolWalletConfig(),
ton: SsoTonWalletConfig(
manifestUrl: 'https://example.com/tonconnect-manifest.json',
),
),
));
// Auth screen
SsoSdk.authScreen(
enabledProviders: [SsoProvider.wallet],
enabledWallets: [
SsoWalletType.metaMask,
SsoWalletType.trustWallet,
SsoWalletType.walletConnect,
SsoWalletType.phantom,
SsoWalletType.tonKeeper,
],
);
The EVM flow wraps reown_appkit; see the Reown AppKit Flutter docs for deeper modal / chain / session configuration and the Link Mode guide for synchronous universal-link envelope delivery (opt-in via SsoEvmWalletConfig.universalLink). Obtain SsoEvmWalletConfig.projectId at dashboard.reown.com.
Wallet types
| Wallet | Type | Chain | Protocol |
|---|---|---|---|
| MetaMask | SsoWalletType.metaMask | ETH | WalletConnect v2 / deep link |
| Trust Wallet | SsoWalletType.trustWallet | ETH | WalletConnect v2 / deep link |
| WalletConnect | SsoWalletType.walletConnect | ETH | WalletConnect v2 (universal) |
| Phantom | SsoWalletType.phantom | SOL | Deep link + X25519 encryption |
| Tonkeeper | SsoWalletType.tonKeeper | TON | TON Connect v2 (SSE bridge) |
Example: all providers
SsoSdk.authScreen(
enabledProviders: [
SsoProvider.emailPassword,
SsoProvider.google,
SsoProvider.apple,
SsoProvider.telegram,
SsoProvider.x,
SsoProvider.wallet,
],
enabledWallets: [
SsoWalletType.metaMask,
SsoWalletType.trustWallet,
SsoWalletType.walletConnect,
SsoWalletType.phantom,
SsoWalletType.tonKeeper,
],
authToken: authToken,
onSuccess: (tokens) { /* ... */ },
);