juice_auth 0.2.0 copy "juice_auth: ^0.2.0" to clipboard
juice_auth: ^0.2.0 copied to clipboard

Authentication lifecycle management for Juice applications. Provider-agnostic login, token refresh, session persistence, and reactive auth state.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.2.0 - 2026-04-18 #

Changed #

  • Updated dependencies to juice: ^1.4.0 and juice_storage: ^1.2.0
  • Refreshed README examples to use the current AuthBloc.withConfig(..., storageBloc: ...) setup pattern

0.1.0 - 2026-02-14 #

Added #

  • Initial release of juice_auth
  • AuthBloc — primary bloc managing authentication lifecycle
  • AuthState with AuthStatus enum (unknown, unauthenticated, authenticated, sessionExpired)
  • AuthProvider interface — provider-agnostic contract for auth backends
  • AuthCredentials hierarchy — EmailCredentials, OAuthCredentials, ApiKeyCredentials, BiometricCredentials
  • LoginUseCase — authenticates via provider, persists tokens, emits state
  • LogoutUseCase — atomic cleanup of tokens, storage, and session
  • RefreshTokenUseCase — singleflight token refresh with Completer
  • RestoreSessionUseCase — reads stored tokens on init, refreshes if valid
  • AuthConfig — providers map, refresh buffer, rate limiting, storage prefix
  • AuthError sealed hierarchy — ProviderAuthError, RefreshFailedError, RateLimitedError, etc.
  • Rebuild groupsauth:status, auth:user, auth:session, auth:error
  • AviatorsloginSuccess, logoutComplete, sessionExpired
  • Secure token persistence via juice_storage StorageBloc
  • Login rate limiting — configurable max attempts with cooldown
0
likes
0
points
164
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

Authentication lifecycle management for Juice applications. Provider-agnostic login, token refresh, session persistence, and reactive auth state.

Homepage
Repository (GitHub)
View/report issues

Topics

#authentication #bloc #state-management #token #session

Funding

Consider supporting this project:

github.com

License

unknown (license)

Dependencies

flutter, juice, juice_storage

More

Packages that depend on juice_auth