Instance Method

initWithURL:callbackURLScheme:completionHandler:

Creates a web authentication session instance.

Declaration

- (instancetype)initWithURL:(NSURL *)URL callbackURLScheme:(NSString *)callbackURLScheme completionHandler:(ASWebAuthenticationSessionCompletionHandler)completionHandler;

Parameters

URL

A URL with the http or https scheme pointing to the authentication webpage.

callbackURLScheme

The custom URL scheme that the app expects in the callback URL.

completionHandler

A completion handler the session calls when it completes successfully, or when the user cancels the session.

See Also

Creating a Session

ASWebAuthenticationSessionCompletionHandler

A completion handler for the web authentication session.