Welcome to the official Frontegg Flutter SDK — your all-in-one solution for integrating authentication and user management into your Flutter mobile app. Frontegg is a self-served user management platform, built for modern SaaS applications. Easily implement authentication, SSO, RBAC, multi-tenancy, and more — all from a single SDK.
The official Flutter plugin, built on Frontegg's native iOS (FronteggSwift) and Android
(frontegg-android-kotlin) SDKs, so one Dart API covers both platforms:
- Hosted and embedded login: the Frontegg login box in an in-app WebView (embedded), or in the system browser and Chrome Custom Tabs (hosted).
- Social login and passkeys: Google, Apple, Microsoft, GitHub, LinkedIn, Facebook, Slack and
custom social providers, plus
loginWithPasskeys()andregisterPasskeys(). - B2B multi-tenancy: the user's tenants and active tenant on
FronteggUser,switchTenant(), and optional per-tenant sessions. - Multi-region: configure several regions natively and select one at runtime with
initWithRegion(). - Multi-app: sign in to a specific Frontegg application with
applicationId. - Step-up authentication:
stepUp()andisSteppedUp()for sensitive actions. - Entitlements: on-device feature and permission checks with
getFeatureEntitlement()andgetPermissionEntitlement(). - Admin Portal (beta):
openAdminPortal()opens the self-service portal in a native WebView. - Session handling: the native SDKs store and refresh tokens,
stateChangedstreams the authentication state, offline mode keeps the session without a network, andgetOrRefreshAccessToken()refreshes the token when needed after the app resumes (in offline mode without a network, it returns the cached token, which may be expired).
This repository includes:
- A Get Started guide for quick integration
- A Setup Guide with detailed setup instructions
- An API Reference for detailed SDK functionality
- Usage Examples with common implementation patterns
- Advanced Topics for complex integration scenarios
- A Hosted (which also has a multi-region mode), Embedded, and Application-Id example projects to help you get started quickly
For full documentation, visit the Frontegg Developer Portal:
🔗 https://developers.frontegg.com
Don't have a Frontegg account yet?
Sign up here → https://portal.us.frontegg.com/signup
The Flutter SDK supports Frontegg's per-tenant sessions feature through the underlying native SDKs.
- On Android, the plugin and example apps use
com.frontegg.sdk:android:1.3.43. - On iOS, the plugin depends on
FronteggSwift:- Flutter 3.41+ (SPM):
1.3.26from GitHub. Runflutter config --enable-swift-package-manager, thenflutter pub getand build. - Note: CocoaPods fallback is no longer supported for
FronteggSwift. - SPM integration requires Xcode 15+.
- Flutter 3.41+ (SPM):
To enable and use per-tenant sessions:
-
Enable the flag in your iOS configuration
- Add the following key to your
Frontegg.plist:
<plist version="1.0"> <dict> <key>enableSessionPerTenant</key> <true/> ... </dict> </plist>
- Add the following key to your
-
Enable the flag in your Android configuration
- Android: verify your Gradle config includes:
buildConfigField "Boolean", "FRONTEGG_ENABLE_SESSION_PER_TENANT", "true"
- Android: verify your Gradle config includes:
Need help? Our team is here for you:
https://support.frontegg.com/frontegg/directories
