<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: 17.4.0 -",
    "macOS: 14.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASWebAuthenticationSessionRequest/callback",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "c:objc(cs)ASWebAuthenticationSessionRequest(py)callback"
  },
  "title" : "callback"
}
-->

# callback

The callback to listen for, which completes the request.

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

## Discussion

You create a callback with the type methods [`customScheme(_:)`](/documentation/AuthenticationServices/ASWebAuthenticationSession/Callback/customScheme(_:)) or [`https(host:path:)`](/documentation/AuthenticationServices/ASWebAuthenticationSession/Callback/https(host:path:)).

Use this callback to check all main frame URLs that load during the request.
When it matches, invoke [`complete(withCallbackURL:)`](/documentation/AuthenticationServices/ASWebAuthenticationSessionRequest/complete(withCallbackURL:)) with that URL.

> Important: Your browser app needs to add <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/ASWebAuthenticationSessionWebBrowserSupportCapabilities/CallbackURLMatchingIsSupported> with the value `YES` to the <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/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.

---

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)