<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASWebAuthenticationSessionWebBrowserSessionHandling/begin(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "c:objc(pl)ASWebAuthenticationSessionWebBrowserSessionHandling(im)beginHandlingWebAuthenticationSessionRequest:"
  },
  "title" : "begin(_:)"
}
-->

# begin(_:)

Handles the given session request from an app.

```
func begin(_ request: ASWebAuthenticationSessionRequest!)
```

## Parameters

`request`

The request to begin handling.

## Discussion

Your browser app implements this method to accept requests from apps that want to use single sign-on for authentication. Inspect the given request to see what URL to use for the request, and what call back scheme to use to reply to the app. Call the request’s [`complete(withCallbackURL:)`](/documentation/AuthenticationServices/ASWebAuthenticationSessionRequest/complete(withCallbackURL:)) method to indicate a completed authentication. Call the [`cancelWithError(_:)`](/documentation/AuthenticationServices/ASWebAuthenticationSessionRequest/cancelWithError(_:)) method if the browser can’t complete the operation, for example because the user cancels it.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)