msal_auth 3.1.0 copy "msal_auth: ^3.1.0" to clipboard
msal_auth: ^3.1.0 copied to clipboard

A comprehensive Flutter plugin for managing Microsoft authentication using the native Microsoft Authentication Library (MSAL).

example/lib/main.dart

import 'package:flutter/material.dart';

import 'screens/login_screen.dart';
import 'screens/multi_account_screen.dart';
import 'screens/single_account_screen.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      initialRoute: LoginScreen.route,
      onGenerateRoute: (settings) {
        switch (settings.name) {
          case LoginScreen.route:
            final addAccount = settings.arguments as bool? ?? false;
            return MaterialPageRoute(
              builder: (context) => LoginScreen(addAccount: addAccount),
            );
          case SingleAccountScreen.route:
            return MaterialPageRoute(
              builder: (context) => const SingleAccountScreen(),
            );
          case MultiAccountScreen.route:
            return MaterialPageRoute(
              builder: (context) => const MultiAccountScreen(),
            );
          default:
            return null;
        }
      },
    );
  }
}
18
likes
160
points
1.1k
downloads

Publisher

verified publisherauberginesolutions.com

Weekly Downloads

A comprehensive Flutter plugin for managing Microsoft authentication using the native Microsoft Authentication Library (MSAL).

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on msal_auth