misskey_auth 0.2.0-beta.1
misskey_auth: ^0.2.0-beta.1 copied to clipboard
Flutter library for Misskey authentication. Supports OAuth 2.0 with PKCE, MiAuth, and secure multi-account token management for iOS and Android.
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.
[Unreleased] #
0.2.0-beta.1 - 2026-09-08 #
Breaking changes #
- Raised the minimum supported versions to Flutter 3.47.1, Dart 3.13.1, and iOS 15; Android requires API 24 or later and compileSdk 37 or later.
- Android credentials saved with the default
SecureTokenStoreonflutter_secure_storage9.x are not carried over when upgrading directly to 11.x. Users must authenticate again for each account. No 10.x migration step is provided; automatic recovery can also reset other values in the shared default storage namespace. This is a storage compatibility break, not an API removal, and does not revoke server-side tokens.
Changed #
- Updated stable dependencies, including
flutter_secure_storage11.0.0,dio5.11.1,flutter_lints6.0.0, and the example'sloader_overlay5.0.0. - Updated Android builds to AGP 9.1.1, Gradle 9.3.1, and Kotlin 2.3.20 while retaining legacy Kotlin plugin support.
- Migrated the iOS example to UIScene and integrated Swift Package Manager.
- Upgraded
flutter_web_auth_2to 5.1.0 and aligned the Android callback Activity configuration with its updated authentication flow
Fixed #
- Android authentication now closes the browser and returns the example app to the foreground after MiAuth or OAuth authorization
- Android release builds of the example app now declare the
INTERNETpermission required for authentication requests - Corrected the Android callback Activity class name and consolidated the English and Japanese setup guidance around the canonical example Manifest
Removed #
- Unused private
MisskeyServerInfomodel (lib/src/models/misskey_server_info.dart)
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