medha_auth 1.0.5 copy "medha_auth: ^1.0.5" to clipboard
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: applicationName parameter is now required in AuthConfig() constructor

Fixed #

  • Fixed critical bug in webview_auth.dart where hardcoded QA backend URL was used instead of config.backendBaseUrl
  • Fixed hardcoded custom scheme in webview_auth.dart - now uses config.customScheme

Added #

  • Added applicationName as a required parameter to AuthConfig
  • Application name is now fully configurable by clients via AuthConfig constructor
  • 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:

  1. 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',
      ),
    )
    
  2. Add applicationName parameter to all AuthConfig() calls

  3. 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
0
likes
130
points
154
downloads

Publisher

verified publishermedha-analytics.ai

Weekly Downloads

A Flutter authentication library for SSO integration with Microsoft authentication

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

app_links, flutter, flutter_secure_storage, http, webview_flutter

More

Packages that depend on medha_auth