Skip to content
pubscout

msal_flutter

2.0.1, released 4 years ago by muljin.com

Microsoft Authentication Library wrapper for Android and iOS

Repository archived
$ flutter pub add msal_flutter
Source repository

What it does

Wraps the Microsoft Authentication Library (MSAL) for Android and iOS to let users sign in and acquire tokens. Supports public client application functionality using the implicit workflow, interactive token acquisition, silent token acquisition, and logout.

AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to authenticate users via Microsoft Azure AD / B2C in a Flutter mobile application
  • You require interactive or silent token acquisition using native MSAL libraries on Android and iOS

Skip it when

  • You need free support or pull request reviews, as maintenance is limited and the package comes as-is
  • You need functionality outside of public client applications and implicit workflow

Strengths

  • Provides direct integration with official MSAL libraries for Android and iOS
  • Supports Azure AD B2C tenants and custom authorities

Weaknesses

  • Maintainers do not offer free support or review PRs
  • Early stage / wrapper nature means bugs may require forking to fix

Setup

Kind
Plugin (native code)
Effort
High
Code generation
No
Direct dependencies
0

Requires setting up Azure AD B2C, configuring AndroidManifest.xml with intent filters and raw JSON config, updating Gradle and Kotlin versions, modifying iOS Info.plist, adding Keychain Sharing capabilities, and modifying AppDelegate.swift.

var pca = await PublicClientApplication.createPublicClientApplication("YOUR-CLIENT-ID");
try {
  String token = await pca.acquireToken(["https://msalfluttertest.onmicrosoft.com/msalbackend/user_impersonation"]);
} on MsalException {
  // error handling logic here
}

Alternatives

Packages that do the same job and could replace msal_flutter.