token_storage 1.2.0
token_storage: ^1.2.0 copied to clipboard
A Flutter wrapper around flutter_secure_storage for managing an auth token pair and generic secure key-value storage, with fresh-install cleanup.
1.2.0 #
TokenPair.createdAt/updatedAtare now optional and default toDateTime.now()when omitted.
1.1.0 #
- Initial stable release.
TokenStorage.init()with fresh-install secure-storage cleanup.- Token management:
saveToken,updateToken,token,accessToken,refreshToken(nullable — for auth systems with no refresh mechanism),hasToken,isTokenExpired,clearToken,setTokenListener,removeTokenListener. - Generic secure storage:
put,get,putObject,getObject,remove,clearAll,watchKey,unWatchKey. JwtDecoderandTokenPair.isExpiredfor checking JWT access token expiry, with no external JWT dependency.