---
title: start()
framework: authenticationservices
role: symbol
role_heading: Instance Method
path: authenticationservices/aswebauthenticationsession/start()
---

# start()

Starts a web authentication session.

## Declaration

```swift
func start() -> Bool
```

## Mentioned in

Authenticating a User Through a Web Service Supporting Single Sign-On in a Web Browser App

## Return Value

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

## Discussion

Discussion 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

- [canStart](authenticationservices/aswebauthenticationsession/canstart.md)
- [cancel()](authenticationservices/aswebauthenticationsession/cancel().md)
