WebAuthenticationBroker exposes a unified authentication flow surface across supported backends.
AuthenticateAsync(Uri requestUri, Uri callbackUri, WebAuthenticationOptions options, CancellationToken cancellationToken)NoneSilentModeUseTitleUseHttpPostUseCorporateNetworkUseWebAuthenticationBroker| Field | Meaning |
|---|---|
ResponseStatus |
Success, UserCancel, or ErrorHttp. |
ResponseData |
Callback payload when available. |
ResponseErrorDetail |
Backend-specific error code when the status is ErrorHttp. |
Controller-level guards validate that:
http or https,javascript, data, file, about, or blob,UserInfo.using NativeWebView.Auth;
using NativeWebView.Core;
NativeWebViewRuntime.EnsureCurrentPlatformRegistered();
using var broker = new WebAuthenticationBroker();
var result = await broker.AuthenticateAsync(
new Uri("https://example.com/auth"),
new Uri("https://example.com/callback"),
WebAuthenticationOptions.None,
cancellationToken);