misskey_auth 0.1.4-beta
misskey_auth: ^0.1.4-beta copied to clipboard
Flutter library for Misskey OAuth authentication. Support for MiAuth format is planned in the future.
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.1.4-beta - 2025-08-18 #
Added #
- Network stability improvements:
- Introduced
RetryPolicyandretry()utility (lib/src/net/retry.dart) - Applied retry to OAuth server info fetch, token exchange, MiAuth check API, and
/api/iuser fetch
- Introduced
- Default networking timeouts (overridable): connect 10s / send 20s / receive 20s
MisskeyOAuthClient,MisskeyMiAuthClient, andMisskeyAuthManagernow accept timeout overrides
- Documentation:
- Added API doc comments for
AccountKey,StoredToken,AccountEntry,TokenStore,SecureTokenStore, andMisskeyAuthManager
- Added API doc comments for
Changed #
/api/irequest now follows common Misskey style: send token in JSON body with{"i": "<token>"}(instead of Authorization header)Dionow receives Map bodies directly (Dio handles JSON encoding internally)
Removed #
- Unused/duplicated config model:
lib/src/models/auth_config.dart - Accidental
lib/main.dart(prevented dartdoc pollution; example retains its own main)
0.1.3-beta - 2025-08-15 #
Added #
- Multi-account token management via
TokenStoreabstraction - Default secure implementation:
SecureTokenStore(backed byflutter_secure_storage) - High-level API
MisskeyAuthManagerto orchestrate OAuth/MiAuth authentication and token persistence - Models and types for account/token management:
StoredToken,AccountKey,AccountEntry - Public exports for store/manager types from
misskey_auth.dart
Changed #
MisskeyOAuthClientandMisskeyMiAuthClientno longer persist tokens; they only perform the authentication flow and return results- Constructors now focus on networking concerns (
Dioand timeouts)
Removed #
- Storage-related APIs from clients:
MisskeyOAuthClient.getStoredAccessToken()MisskeyOAuthClient.clearTokens()MisskeyMiAuthClient.getStoredAccessToken()MisskeyMiAuthClient.clearTokens()
MisskeyMiAuthClientconstructor parameter for storage injection
Breaking Changes #
- Removed storage APIs from both
MisskeyOAuthClientandMisskeyMiAuthClient(useMisskeyAuthManagerandTokenStoreinstead) MisskeyMiAuthClientconstructor signature changed (storage parameter removed)- Token lifecycle (save/read/delete) responsibilities moved from clients to
TokenStore/MisskeyAuthManager
0.1.2-beta - 2025-08-15 #
Added #
- MiAuth authentication support - Alternative authentication method for Misskey servers
- Comprehensive error handling system - Granular exception classes for different error scenarios
Changed #
- Error handling architecture - Replaced generic exceptions with specific
MisskeyAuthExceptionsubclasses - OAuth client improvements - Enhanced error mapping and better exception handling
- MiAuth client implementation - Complete MiAuth authentication flow with proper error handling
Features #
MisskeyMiAuthClient- Main MiAuth authentication clientMisskeyMiAuthConfig- Configuration class for MiAuth authenticationMiAuthTokenResponse- Response model for MiAuth authentication- Enhanced exception classes including:
OAuthNotSupportedException- Server doesn't support OAuth 2.0MiAuthDeniedException- User denied MiAuth permissionNetworkException- Network connectivity issuesUserCancelledException- User cancelled authenticationCallbackSchemeErrorException- URL scheme configuration errors- And 15+ more specific exception classes
0.1.0-beta - 2025-08-12 #
Added #
- Initial beta release
- OAuth 2.0 authentication for Misskey servers (v2023.9.0+)
- External browser authentication (no embedded WebViews)
- Secure token storage using flutter_secure_storage
- PKCE (Proof Key for Code Exchange) implementation
- Custom URL scheme handling for authentication callbacks
- Cross-platform support (iOS/Android)
Features #
MisskeyOAuthClient- Main authentication clientMisskeyOAuthConfig- Configuration class for authentication- Comprehensive error handling with custom exceptions
- Support for custom callback schemes