Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WebAuthenticationBroker.AuthenticateAsync(WebAuthenticationOptions, Uri, Uri) | authenticateAsync(WebAuthenticationOptions, Uri, Uri) method

Starts the asynchronous authentication operation with three inputs. You can call this method multiple times in a single application or across multiple applications at the same time.

Syntax


Windows.Security.Authentication.Web.WebAuthenticationBroker.authenticateAsync(options, requestUri, callbackUri).done( /* Your success and error handlers */ );

Parameters

options

Type: WebAuthenticationOptions

The options for the authentication operation.

requestUri

Type: Windows.Foundation.Uri [JavaScript] | System.Uri [.NET] | Windows::Foundation::Uri [C++]

The starting URI of the web service. This URI must be a secure address of https://.

callbackUri

Type: Windows.Foundation.Uri [JavaScript] | System.Uri [.NET] | Windows::Foundation::Uri [C++]

The callback URI that indicates the completion of the web authentication. The broker matches this URI against every URI that it is about to navigate to. The broker never navigates to this URI, instead the broker returns the control back to the application when the user clicks a link or a web server redirection is made.

Return value

Type: IAsyncOperation<WebAuthenticationResult>

The way to query the status and get the results of the authentication operation. If you are getting an invalid parameter error, the most common cause is that you are not using HTTPS for the requestUri parameter.

Remarks

When this method is used, no session state or persisted cookies are retained across multiple calls from the same or different Windows Store apps. This method must be called on the UI thread.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Security.Authentication.Web
Windows::Security::Authentication::Web [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported

Namespace

Windows.Security.Authentication.Web
Windows::Security::Authentication::Web [C++]

Metadata

Windows.winmd

See also

WebAuthenticationBroker
AuthenticateAsync(WebAuthenticationOptions, Uri)
Authentication and user identity (JavaScript)
Authentication and user identity
Quickstart: Connecting to an online identity provider (JavaScript)
Web authentication broker
Windows authentication broker sample

 

 

Show: