flutter_better_auth
0.6.6, released 3 weeks ago by miladev.site
Dart and Flutter client for the Better Auth platform.
What it does
Enables secure sign-in, sign-up, social OAuth, and session management in Flutter applications using the Better Auth platform. Supports first-party plugins such as 2FA, passkeys, organizations, and magic links.
AI-written summary of version 0.6.6, based on the package's README and metadata. Report an inaccuracy
Use it when
- Your backend is built with Better Auth and you need a native Flutter client.
- You require secure encrypted session storage and reactive auth state changes in your app.
Skip it when
- You use a completely different backend authentication provider like Firebase or Supabase.
Strengths
- Full-featured integration covering sign-in, sign-up, session management, and first-party plugins.
- Built-in reactive auth state with automatic session refresh on app resume and network reconnect.
- Encrypted session storage by default using Keychain and Keystore.
Weaknesses
- Requires a matching Better Auth server setup and configuration.
- Native social sign-in requires specific platform-level intent filter configuration.
Setup
- Kind
- Flutter widgets
- Effort
- Medium
- Code generation
- Yes (build_runner)
- Direct dependencies
- 13
Requires initializing with a base URL and deep-link scheme, and registering the callback activity in Android's AndroidManifest.xml for native social login.
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await FlutterBetterAuth.initialize(
url: 'https://your-server.com/api/auth',
scheme: 'myapp',
);
runApp(const MyApp());
}Alternatives
Packages that do the same job and could replace flutter_better_auth.
- firebase_auth
Choose this if your backend is Firebase instead of a self-hosted Better Auth server.
99Compare
Works with
Packages commonly used together with flutter_better_auth: ones it builds on, ones built on it, and its own family.
- webflutter_better_auth depends on itLightweight bindings for browser APIs via JS interop
- json_annotationflutter_better_auth depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- path_providerflutter_better_auth depends on itProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- flutter_secure_storageflutter_better_auth depends on itSecure key-value storage using platform-specific secure mechanisms
- dioflutter_better_auth depends on itA powerful HTTP networking package for Dart and Flutter with interceptors and request cancellation.
- freezed_annotationflutter_better_auth depends on itAnnotations for the freezed code-generator.
- connectivity_plusflutter_better_auth depends on itDiscover the state of network connectivity (WiFi, mobile, ethernet) on Android, iOS, Web and desktops.
- loggerflutter_better_auth depends on itAn extensible logger for printing formatted logs with levels, custom filters, and printers.