---
title: "begin(_:)"
framework: authenticationservices
role: symbol
role_heading: Instance Method
path: "authenticationservices/aswebauthenticationsessionwebbrowsersessionhandling/begin(_:)"
---

# begin(_:)

Handles the given session request from an app.

## Declaration

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

## Parameters

- `request`: The request to begin handling.

## Mentioned in

Supporting Single Sign-On in a Web Browser App

## Discussion

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:) method to indicate a completed authentication. Call the cancelWithError(_:) method if the browser can’t complete the operation, for example because the user cancels it.

## See Also

### Starting and Stopping a Session Request

- [cancel(_:)](authenticationservices/aswebauthenticationsessionwebbrowsersessionhandling/cancel(_:).md)
- [ASWebAuthenticationSessionRequest](authenticationservices/aswebauthenticationsessionrequest.md)
