liveBook · Manning

IBrowser

As explained in .NET MAUI in Action

IBrowser is the IdentityModel.OidcClient interface that abstracts launching an authentication browser interaction and returning its result.

IBrowser is the IdentityModel.OidcClient interface that lets an application launch an authentication browser interaction and return its result. In a .NET MAUI app, an implementation connects OidcClient to WebAuthenticator. section 8.1.2

Authentication flow

OidcClient calls IBrowser, the implementation opens the identity provider login page through WebAuthenticator, and the provider returns an authorization result to the app. The implementation parses that result into a BrowserResult so OidcClient can extract tokens. section 8.1.2

Two interfaces share the name IBrowser: .NET MAUI's interface and IdentityModel.OidcClient's interface. Use the fully qualified name or an alias such as using IBrowser = IdentityModel.OidcClient.Browser.IBrowser. section 8.2.1

The redirect URI must return the authentication response to the app. A custom URL scheme associates that URI with the application through platform-specific configuration. section 8.1.2

How .NET MAUI in Action covers it

How deep it goes
Explains the interface contract, implementation steps, result conversion, registration, and redirect configuration without detailing OidcClient internals.
Examples
Uses AuthBrowser, WebAuthenticator, BrowserResult, MauiProgram registration, and platform-specific custom URL configuration.
What it assumes
Assumes basic C# and .NET MAUI familiarity while demonstrating OidcClient integration and redirect handling.
What you can do after
Build it from scratch by implementing IBrowser, routing authentication through WebAuthenticator, parsing the result, and registering the service.
How it connects
Relates IBrowser to OidcClient, WebAuthenticator, OAuth 2.0, OpenID Connect, dependency injection, and custom URL schemes.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of .NET MAUI in Action. The section links point to the parts of the book it draws on.