maui-authentication

Implement OAuth 2.0 and OpenID Connect authentication in .NET MAUI apps.

Updated Nov 5, 2025
One-click install
npx skills add https://github.com/mkazimoto/AppMAUICopilot --skill maui-authentication-mkazimoto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maui-authentication
Source: https://github.com/mkazimoto/AppMAUICopilot/tree/main/.github/skills/maui-authentication
Command: npx skills add https://github.com/mkazimoto/AppMAUICopilot --skill maui-authentication-mkazimoto

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Simplifies and secures authentication in .NET MAUI applications by providing integrated WebAuthenticator and MSAL.NET-based flows, broker support, token caching, and Blazor Hybrid readiness.

Core Features & Use Cases

  • WebAuthenticator-driven OAuth 2.0 / OpenID Connect sign-in for MAUI apps across Android and iOS.
  • MSAL.NET-powered Entra ID authentication with broker support, token caching, and silent token refresh.
  • DelegatingHandler-based bearer token injection for protected API calls.
  • Blazor Hybrid integration and platform-specific setup guidance for seamless auth across UI layers.

Quick Start

Authenticate users in MAUI by injecting an IAuthService and calling SignInAsync to obtain tokens and store them securely.

Frequently Asked Questions about maui-authentication

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement OAuth 2.0 sign-in in .NET MAUI apps?

You implement OAuth 2.0 sign-in in .NET MAUI using WebAuthenticator to handle the authorization flow across Android and iOS, returning tokens to the application for secure storage.

What's the best way to authenticate MAUI users with Azure Entra ID?

Authenticating MAUI users with Azure Entra ID is best handled via MSAL.NET, which provides brokered single sign-on, silent token refresh, and local token caching across mobile platforms.

Can I use MSAL.NET with Blazor Hybrid in a MAUI application?

Yes, MSAL.NET integrates with Blazor Hybrid in MAUI applications by providing platform-specific setup and a reusable dependency injection service that bridges authentication across UI layers.

How do I attach bearer tokens to HTTP requests in a MAUI app?

You attach bearer tokens to HTTP requests in a MAUI app by using a DelegatingHandler that intercepts outgoing API calls and automatically injects the cached authentication token into the headers.

Does WebAuthenticator support brokered SSO across iOS and Android?

WebAuthenticator handles the OAuth 2.0 flow, while brokered SSO across iOS and Android is managed by MSAL.NET interacting with the native Entra ID authentication broker.