A Flutter/Dart library that embeds authentication into API calls, supporting OAuth2, Basic Auth, and multiple providers.
Simple Auth is a Dart and Flutter library that simplifies authentication for API calls by embedding it directly into the API layer. It handles login flows, credential caching, and token refresh automatically, so developers don't have to manage authentication manually. It supports multiple providers like Google, Facebook, GitHub, and any OAuth2 or Basic Auth server.
Flutter and Dart developers building mobile or cross-platform apps that require authenticated API calls to various services. It's ideal for those who want to avoid implementing authentication logic from scratch.
Developers choose Simple Auth because it drastically reduces the complexity of adding authentication, supports a wide range of providers out-of-the-box, and includes features like automatic token refresh and code generation for type-safe API clients.
The Simplest way to Authenticate in Flutter
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports Azure AD, Amazon, Dropbox, Facebook, GitHub, Google, LinkedIn, Microsoft Live, Keycloak, and any OAuth2/Basic Auth server, reducing integration effort for common services.
Automatically caches credentials and refreshes expired tokens without user intervention, as shown in the usage example where API calls proceed seamlessly.
With SimpleAuthFlutter.init(), it presents login UI automatically on iOS and Android, minimizing code for authentication flows in mobile apps.
Includes a generator to create typed API clients from annotated definitions, cutting boilerplate and ensuring type safety, as demonstrated in the example with GoogleTestApi.
Requires manual setup of redirect URIs, intent filters in Android manifest, and AppDelegate modifications in iOS, which can be error-prone and time-consuming, as detailed in the README.
The README's TODO list includes 'Add more documentation', indicating sparse docs that may lack comprehensive examples or troubleshooting guidance.
The TODO mentions 'Add native flutter providers for google', suggesting some providers rely on web-based authentication, potentially offering suboptimal user experience or performance.