---
title: callback
framework: authenticationservices
role: symbol
role_heading: Instance Property
path: authenticationservices/aswebauthenticationsessionrequest/callback
---

# callback

The callback to listen for, which completes the request.

## Declaration

```swift
var callback: ASWebAuthenticationSession.Callback? { get }
```

## Discussion

Discussion You create a callback with the type methods customScheme(_:) or https(host:path:). Use this callback to check all main frame URLs that load during the request. When it matches, invoke complete(withCallbackURL:) with that URL. important: Your browser app needs to add CallbackURLMatchingIsSupported with the value YES to the ASWebAuthenticationSessionWebBrowserSupportCapabilities dictionary in your app’s information property list to use this API. If the system doesn’t find this key in the default browser app, it sends the request to Safari instead.

## See Also

### Finishing a request

- [ASWebAuthenticationSession.Callback](authenticationservices/aswebauthenticationsession/callback.md)
- [complete(withCallbackURL:)](authenticationservices/aswebauthenticationsessionrequest/complete(withcallbackurl:).md)
- [cancelWithError(_:)](authenticationservices/aswebauthenticationsessionrequest/cancelwitherror(_:).md)
