Auth done right. No black box.

Authyra is a modular authentication framework for Dart and Flutter. A pure Dart core you can unit-test anywhere, OAuth2 providers you wire in one call, and a reactive Stream<AuthState> that plugs into any UI framework.

Built for developers who own their auth

    Pure Dart core
    Zero Flutter dependency in authyra. Run the same auth logic in your mobile app, a Dart Frog backend, and a CLI tool — with a single dart test for all of it.
    Pluggable everywhere
    AuthProvider and AuthStorage are interfaces. Swap Google for SAML, flutter_secure_storage for Redis, or mock everything in tests — no subclasses required.
    Multi-account built in
    AccountManager ships in the core — not as an add-on. Switch between work and personal accounts, sign out selectively, and clean expired sessions in one call.
    Silent token refresh
    Providers that set supportsRefresh: true get automatic background renewal. When the refresh token expires, the session is cleared and authStateChanges emits — no surprises.
    OAuth2 with PKCE
    OAuth2Provider (in authyra_flutter) implements the full Authorization Code + PKCE flow. Prebuilt providers for Google, GitHub, Apple, and a proxy mode for keeping client secrets server-side.
    Reactive by default
    authStateChanges is a broadcast Stream<AuthState> with Equatable deduplication. Wire it to StreamBuilder, Riverpod, Bloc, or GoRouter — zero boilerplate.
Copyright © 2026