Welcome to the official Frontegg iOS SDK — your all-in-one solution for integrating authentication and user management into your iOS 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.
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
- An Offline Mode guide for custom offline UI, reconnect behavior, and logout expectations
- A Hosted, Embedded, Application-Id, and Multi-Region example projects to help you get started quickly
For full documentation, visit the Frontegg Developer Portal:
🔗 https://developers.frontegg.com
You can disable automatic token refresh by adding disableAutoRefresh to Frontegg.plist:
<key>disableAutoRefresh</key>
<true/>Behavior:
- Default value is
false(auto refresh is enabled). - When
disableAutoRefreshistrue, SDK internal/automatic refresh flows are blocked(including offline mode refreshing, timers and etc.). - Manual refresh calls (for example,
getOrRefreshAccessTokenAsync()) still work. - This lets apps fully control when token refresh happens while keeping explicit refresh APIs available.
The SDK can load and check user entitlements (features and permissions) from the Frontegg Entitlements API. Enable entitlements in Frontegg.plist with entitlementsEnabled: true, then:
- Entitlements are fetched automatically on login. You can also call
FronteggApp.shared.auth.loadEntitlements(forceRefresh:completion:)yourself: by default (forceRefresh: false) the SDK uses cached entitlements when available (no network call). PassforceRefresh: trueto always fetch from the API (GET .../frontegg/entitlements/api/v2/user-entitlements). - Use the cached state for local checks:
getFeatureEntitlements(featureKey:)— check by feature keygetPermissionEntitlements(permissionKey:)— check by permission keygetEntitlements(options:)— unified check withEntitledToOptions.featureKey(_)or.permissionKey(_)
All checks after loadEntitlements use in-memory state only (no extra network calls). Cache is cleared on logout. Access the raw cached set of keys via FronteggApp.shared.auth.entitlements.state (EntitlementState: featureKeys, permissionKeys).
Don't have a Frontegg account yet?
Sign up here → https://portal.us.frontegg.com/signup
Need help? Our team is here for you:
https://support.frontegg.com/frontegg/directories
