<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "macCatalyst: 17.4.0 -",
    "macOS: 14.4.0 -",
    "tvOS: 17.4.0 -",
    "visionOS: 1.1.0 -",
    "watchOS: 10.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASWebAuthenticationSession/Callback",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Authentication Services",
      "AuthenticationServices"
    ],
    "preciseIdentifier" : "c:objc(cs)ASWebAuthenticationSessionCallback"
  },
  "title" : "ASWebAuthenticationSession.Callback"
}
-->

# ASWebAuthenticationSession.Callback

An object for evaluating navigation events in an authentication session.

```
class Callback
```

## Overview

When [`ASWebAuthenticationSession`](/documentation/AuthenticationServices/ASWebAuthenticationSession) navigates to a matching URL, it passes the URL to the session completion handler.

> 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.

## Topics

### Creating callbacks

[`+  callbackWithCustomScheme:`](/documentation/AuthenticationServices/ASWebAuthenticationSession/Callback/customScheme(_:))

Creates a callback object that matches against URLs with the given custom scheme.

[`+  callbackWithHTTPSHost:path:`](/documentation/AuthenticationServices/ASWebAuthenticationSession/Callback/https(host:path:))

Creates a callback object that matches against HTTPS URLs with the given host and path.

### Evaluating URLs

[`-  matchesURL:`](/documentation/AuthenticationServices/ASWebAuthenticationSession/Callback/matchesURL(_:))

Checks whether a given URL matches the callback object.

## Relationships

### Conforms To

[`CVarArg`](/documentation/Swift/CVarArg)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)