juice_auth 0.2.2
juice_auth: ^0.2.2 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.1 - 2026-05-28 #
Added #
- Tests covering the README's previously-unverified refresh-scheduling claims:
the past-window immediate-fire branch of
scheduleRefresh, the auto-refreshTimerpath (scheduleRefresh→TokenExpiryEvent→RefreshTokenEvent), and singleflight collapse of concurrentRefreshTokenEvents into a single provider call.
Changed #
doc/SPEC.mdreconciled with the shipping implementation; added an Implementation Notes section documenting intentional divergences (code is the source of truth).
0.2.0 - 2026-04-18 #
Changed #
- Updated dependencies to
juice: ^1.4.0andjuice_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 lifecycleAuthStatewithAuthStatusenum (unknown,unauthenticated,authenticated,sessionExpired)AuthProviderinterface — provider-agnostic contract for auth backendsAuthCredentialshierarchy —EmailCredentials,OAuthCredentials,ApiKeyCredentials,BiometricCredentialsLoginUseCase— authenticates via provider, persists tokens, emits stateLogoutUseCase— atomic cleanup of tokens, storage, and sessionRefreshTokenUseCase— singleflight token refresh withCompleterRestoreSessionUseCase— reads stored tokens on init, refreshes if validAuthConfig— providers map, refresh buffer, rate limiting, storage prefixAuthErrorsealed hierarchy —ProviderAuthError,RefreshFailedError,RateLimitedError, etc.- Rebuild groups —
auth:status,auth:user,auth:session,auth:error - Aviators —
loginSuccess,logoutComplete,sessionExpired - Secure token persistence via
juice_storageStorageBloc - Login rate limiting — configurable max attempts with cooldown