Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Flutter
  3. SimpleAuth

SimpleAuth

MITDart

A Flutter/Dart library that embeds authentication into API calls, supporting OAuth2, Basic Auth, and multiple providers.

GitHubGitHub
355 stars109 forks0 contributors

What is SimpleAuth?

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.

Target Audience

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.

Value Proposition

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.

Overview

The Simplest way to Authenticate in Flutter

Use Cases

Best For

  • Adding Google Sign-In to a Flutter app with automatic token handling
  • Integrating multiple OAuth2 providers (e.g., Facebook, GitHub) without writing custom auth flows
  • Building Flutter apps that interact with secured APIs requiring token-based authentication
  • Simplifying API client creation with generated, typed methods for authenticated endpoints
  • Handling OAuth2 token refresh and credential caching transparently in Dart applications
  • Developing cross-platform mobile apps that need consistent authentication across iOS and Android

Not Ideal For

  • Projects requiring server-side authentication in non-Dart environments (e.g., Node.js or Python backends)
  • Apps needing drop-in authentication without manual platform-specific redirect setup (like Firebase Auth's out-of-box experience)
  • Teams using niche OAuth providers with complex flows not covered by the built-in list (e.g., custom SAML or OpenID Connect variations)
  • Applications where automatic UI presentation is undesirable, such as headless or CLI tools

Pros & Cons

Pros

Broad Provider Coverage

Supports Azure AD, Amazon, Dropbox, Facebook, GitHub, Google, LinkedIn, Microsoft Live, Keycloak, and any OAuth2/Basic Auth server, reducing integration effort for common services.

Automatic Token Refresh

Automatically caches credentials and refreshes expired tokens without user intervention, as shown in the usage example where API calls proceed seamlessly.

Flutter UI Integration

With SimpleAuthFlutter.init(), it presents login UI automatically on iOS and Android, minimizing code for authentication flows in mobile apps.

Code Generation Efficiency

Includes a generator to create typed API clients from annotated definitions, cutting boilerplate and ensuring type safety, as demonstrated in the example with GoogleTestApi.

Cons

Platform Configuration Complexity

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.

Documentation Gaps

The README's TODO list includes 'Add more documentation', indicating sparse docs that may lack comprehensive examples or troubleshooting guidance.

Incomplete Native Integrations

The TODO mentions 'Add native flutter providers for google', suggesting some providers rely on web-based authentication, potentially offering suboptimal user experience or performance.

Frequently Asked Questions

Quick Stats

Stars355
Forks109
Contributors0
Open Issues62
Last commit10 months ago
CreatedSince 2018

Tags

#token-management#dart#oauth2#authentication#api-client#mobile-development#cross-platform#flutter#flutter-plugin#dart-library

Built With

F
Flutter
D
Dart

Included in

Flutter59.5k
Auto-fetched 4 hours ago

Related Projects

Firebase AuthFirebase Auth

🔥 A collection of Firebase plugins for Flutter apps.

Stars9,228
Forks4,095
Last commit16 hours ago
LoginLogin

100% Shared Code Android/iOS Login Example - JSON API

Stars713
Forks197
Last commit5 years ago
Facebook LoginFacebook Login

A Flutter plugin for allowing users to authenticate with native Android & iOS Facebook login SDKs.

Stars403
Forks328
Last commit5 years ago
Flutter AppAuthFlutter AppAuth

A Flutter wrapper for AppAuth iOS and Android SDKs

Stars307
Forks286
Last commit5 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub