Instance Method


Starts a web authentication session.


func start() -> Bool

Return Value

A Boolean value indicating whether the web authentication session started successfully.


Only call this method once for a given ASWebAuthenticationSession instance after initialization. Calling the start() method on a canceled session results in a failure.

In macOS, and for iOS apps with a deployment target of iOS 13 or later, after you call start(), the session instance stores a strong reference to itself. To avoid deallocation during the authentication process, the session keeps the reference until after it calls the completion handler.

For iOS apps with a deployment target earlier than iOS 13, your app must keep a strong reference to the session to prevent the system from deallocating the session while waiting for authentication to complete.

See Also

Starting and Stopping a Session

func cancel()

Cancels a web authentication session.