Table of Contents

Class ASWebAuthenticationSessionBrowser

Namespace
Auth0.OidcClient
Assembly
Auth0.OidcClient.dll

Implements the IdentityModel.OidcClient.Browser.IBrowser interface using AuthenticationServices.ASWebAuthenticationSession for support on iOS 12+.

public class ASWebAuthenticationSessionBrowser : IOSBrowserBase, IBrowser
Inheritance
ASWebAuthenticationSessionBrowser
Implements
IBrowser
Inherited Members

Constructors

ASWebAuthenticationSessionBrowser(ASWebAuthenticationSessionOptions)

Creates a new instance of the ASWebAuthenticationSession Browser.

public ASWebAuthenticationSessionBrowser(ASWebAuthenticationSessionOptions sessionOptions = null)

Parameters

sessionOptions ASWebAuthenticationSessionOptions

The ASWebAuthenticationSessionOptions specifying the configuration for the ASWebAuthenticationSession.

Examples

If any custom browser configuration is needed (e.g. using PrefersEphemeralWebBrowserSession), a new browser instance should be instantiated and passed to Browser.

var client = new Auth0Client(new Auth0ClientOptions
{
  Domain = "YOUR_AUTH0_DOMAIN",
  ClientId = "YOUR_AUTH0_CLIENT_ID",
  Browser = new ASWebAuthenticationSessionBrowser(
    new ASWebAuthenticationSessionOptions
    {
      PrefersEphemeralWebBrowserSession = true
    }
  )
});

Properties

SessionOptions

Configuration for the ASWebAuthenticationSession.

public ASWebAuthenticationSessionOptions SessionOptions { get; }

Property Value

ASWebAuthenticationSessionOptions

Methods

Launch(BrowserOptions, CancellationToken)

Launch a browser with the options and URL specified by the IdentityModel.OidcClient.Browser.BrowserOptions.

protected override Task<BrowserResult> Launch(BrowserOptions options, CancellationToken cancellationToken = default)

Parameters

options BrowserOptions

IdentityModel.OidcClient.Browser.BrowserOptions specifying the parameters to be used in launching the browser.

cancellationToken CancellationToken

Optional CancellationToken that could be used to cancel the browser.

Returns

Task<BrowserResult>

A Task that will contain a IdentityModel.OidcClient.Browser.BrowserResult with details of wether the launch process succeeded or not by way of a IdentityModel.OidcClient.Browser.BrowserResultType.