medha_auth 1.0.5
medha_auth: ^1.0.5 copied to clipboard
A Flutter authentication library for SSO integration with Microsoft authentication
Changelog #
All notable changes to the medha_auth package will be documented in this file.
1.0.5 - 2026-02-25 #
Fixed #
- Critical logout bug: Fixed automatic re-login issue where WebView cookies were not being cleared
- Added
WebViewAuth.clearWebViewData()static method to clear WebView cookies and cache - Updated
AuthClient.logout()to clear WebView data before clearing storage - Ensures SSO session is fully cleared on logout, forcing credential prompt on next login
Technical Details #
- WebView cookies from SSO server are now properly cleared during logout
- Logout flow order: WebView clear → Backend invalidate → Storage clear → State reset
- Prevents automatic re-authentication from cached SSO session cookies
1.0.4 - 2026-01-16 #
BREAKING CHANGES #
- Removed:
AuthConfig.qa()factory method - no longer available - Removed:
AuthConfig.production()factory method - no longer available - Required:
applicationNameparameter is now required inAuthConfig()constructor
Fixed #
- Fixed critical bug in
webview_auth.dartwhere hardcoded QA backend URL was used instead ofconfig.backendBaseUrl - Fixed hardcoded custom scheme in
webview_auth.dart- now usesconfig.customScheme
Added #
- Added
applicationNameas a required parameter toAuthConfig - Application name is now fully configurable by clients via
AuthConfigconstructor - All URLs and configuration values are now client-controlled with zero hardcoded values
Migration Guide #
If you're upgrading from v1.x.x, you need to:
-
Replace factory method calls with direct
AuthConfig()constructor:// Before (v1.x.x) AuthClient(config: AuthConfig.qa()) // After (v2.0.0) AuthClient( config: AuthConfig( ssoBaseUrl: 'https://your-sso-url.com', backendBaseUrl: 'https://your-backend-url.com', applicationName: 'YourApp', customScheme: 'yourapp', ), ) -
Add applicationName parameter to all
AuthConfig()calls -
Load configuration from environment variables (recommended):
AuthConfig( ssoBaseUrl: dotenv.env['SSO_BASE_URL']!, backendBaseUrl: dotenv.env['SSO_BACKEND_URL']!, applicationName: dotenv.env['SSO_APPLICATION_NAME']!, customScheme: dotenv.env['SSO_CUSTOM_SCHEME'] ?? 'medhaauth', )
1.0.2 - 2026-01-06 #
- Issue fix
- Added try-catch error handling