Skip to content

frontegg/frontegg-ios-swift

Repository files navigation

Frontegg iOS SDK

Frontegg_iOS_SDK (Swift)

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.

📚 Documentation

This repository includes:

For full documentation, visit the Frontegg Developer Portal:
🔗 https://developers.frontegg.com


Advanced

Disable Auto Refresh

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 disableAutoRefresh is true, 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.

Entitlements

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:

  1. 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). Pass forceRefresh: true to always fetch from the API (GET .../frontegg/entitlements/api/v2/user-entitlements).
  2. Use the cached state for local checks:
    • getFeatureEntitlements(featureKey:) — check by feature key
    • getPermissionEntitlements(permissionKey:) — check by permission key
    • getEntitlements(options:) — unified check with EntitledToOptions.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).


🧑‍💻 Getting Started with Frontegg

Don't have a Frontegg account yet?
Sign up here → https://portal.us.frontegg.com/signup


💬 Support

Need help? Our team is here for you:
https://support.frontegg.com/frontegg/directories

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors