Share via


WebAuthenticatorExtensions.AuthenticateAsync Method

Definition

Begin an authentication flow by navigating to the specified url and waiting for a callback/redirect to the callbackUrl scheme.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<Microsoft::Maui::Authentication::WebAuthenticatorResult ^> ^ AuthenticateAsync(Microsoft::Maui::Authentication::IWebAuthenticator ^ webAuthenticator, Uri ^ url, Uri ^ callbackUrl);
public static System.Threading.Tasks.Task<Microsoft.Maui.Authentication.WebAuthenticatorResult> AuthenticateAsync (this Microsoft.Maui.Authentication.IWebAuthenticator webAuthenticator, Uri url, Uri callbackUrl);
static member AuthenticateAsync : Microsoft.Maui.Authentication.IWebAuthenticator * Uri * Uri -> System.Threading.Tasks.Task<Microsoft.Maui.Authentication.WebAuthenticatorResult>
<Extension()>
Public Function AuthenticateAsync (webAuthenticator As IWebAuthenticator, url As Uri, callbackUrl As Uri) As Task(Of WebAuthenticatorResult)

Parameters

webAuthenticator
IWebAuthenticator

The IWebAuthenticator to use for the authentication flow.

url
Uri

Url to navigate to, beginning the authentication flow.

callbackUrl
Uri

Expected callback url that the navigation flow will eventually redirect to.

Returns

Returns a result parsed out from the callback url.

Applies to