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
ASWebAuthenticationSessionOptionsThe 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
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
BrowserOptionsIdentityModel.OidcClient.Browser.BrowserOptions specifying the parameters to be used in launching the browser.
cancellationToken
CancellationTokenOptional CancellationToken that could be used to cancel the browser.