Pakete, Repositories und App-Kategorien suchen

GitHub-RepositoryFrancessco121/msal-js-dart

msal-js-dart

Ein Dart-Wrapping für die "Microsoft Authentication Library for JavaScript (MSAL.js)".

Projektcover von msal-js-dart
Sterne
14
Forks
14
Letzter Push (UTC)
20.01.2026
Projektstatus
Archiviert

Original-README

Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.

Pub Version

[!CAUTION] Discontinued: This package is no longer being developed. Please see pub.dev for alternatives or consider creating a fork.

Existing releases will remain available both here on GitHub and on pub.dev.

MSAL.js for Dart

A Dart wrapper for the Microsoft Authentication Library for JavaScript (MSAL.js).

Note: This package wraps the MSAL.js 2.x (msal-browser) library. For 1.x (msal-core) support, please see the latest 1.x release of this package.

Contents

Install MSAL.js

This package is just a Dart wrapper and does not come with a build of MSAL.js. Please refer to the MSAL.js documentation for installation. Please note that you will need a CDN build of MSAL.js and not an NPM build.

Version Compatibility

This package will match the version of MSAL.js which it supports up to the minor revision. For example, version 2.14.0 of this package supports MSAL.js 2.14.x. If MSAL.js increments its minor version without adding or changing its API surface, this package will not have a matching release since there's nothing to update. Additionally, this package may have patch releases that do not reflect the patch releases from MSAL.js.

Avoid using versions of MSAL.js older than versions of this package. APIs may be available in Dart that do not exist in the JavaScript API and can lead to runtime failures. Newer minor versions of MSAL.js should work fine since both libraries follow semantic versioning.

Usage

Please see the various examples and sample applications for usage information in various scenarios such as:

Additionally, please see the official MSAL.js usage documentation. The examples and samples provided by this package do not cover everything, you will need to read the official MSAL.js documentation to fully understand how to use MSAL.

Class, function, and parameter names are almost all the same between this wrapper and MSAL.js (please see "Differences from MSAL.js" for more information). Following MSAL.js examples with Dart should be straight-forward.

Differences from MSAL.js

This package has a few minor differences from the JavaScript and TypeScript APIs in MSAL.js. These are mainly due to incompatibilities between TypeScript and Dart and quality-of-life differences to provide a more idiomatic Dart API.

  • APIs returning JavaScript Promises instead return Dart Futures.
  • TypeScript string unions are represented as Dart enums.
  • MSAL errors are represented as Dart exceptions and use the suffix Exception instead of Error (e.g. AuthError in MSAL.js is AuthException in this wrapper).
  • Typescript interfaces are represented as a full Dart type. Instead of passing a map which meets the interface requirements, an actual type must be constructed (e.g. instead of loginPopup({scopes: []}) you would do loginPopup(PopupRequest()..scopes = [])).
  • PublicClientApplication.handleRedirectPromise was renamed to handleRedirectFuture since it does not return a promise in the Dart API.

Contributing

Contributions to this package are more than welcome! If you have an immediate need for a new MSAL feature to be wrapped or for a bug to be fixed, please consider opening a pull request.

Please see our full contribution guide for more information.

Ethan Lafrenais GitHub avatar
GitHub-Autor

Ethan Lafrenais ↗

aka Shinx121

Massachusetts, USAOffizielle Website ↗
SprachenDartHTML

Kategorien

Verwendete Abhängigkeiten

Abhängigkeiten 3 Einträge

  • js^0.6.3
  • lintsEntwicklung^1.0.1
  • testEntwicklung^1.17.0

Wie wähle ich ein passendes Repository?

Nach Anwendungsfall filtern, Aktivität vergleichen und vor der Nutzung das Originalprojekt prüfen.

  1. Nach Name, Autor oder Beschreibung suchen und nach Thema eingrenzen.
  2. Sterne, Forks und letzte Pushes vergleichen. Sterne zeigen Interesse, garantieren aber keine Qualität.
  3. Vor der Nutzung README, Lizenz und Issues auf GitHub prüfen.

Quellen und Pflege

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗