---
title: "https(host:path:)"
framework: authenticationservices
role: symbol
role_heading: Type Method
path: "authenticationservices/aswebauthenticationsession/callback/https(host:path:)"
---

# https(host:path:)

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

## Declaration

```swift
class func https(host: String, path: String) -> Self
```

## Parameters

- `host`: The host that the app requires in the callback URL. The host must be a member of a domain associated with the app, as described in doc://com.apple.documentation/documentation/Xcode/supporting-associated-domains.
- `path`: The path that the app requires in the callback URL.

## Discussion

Discussion The following example creates a session that requires a callback with an https:// URL: let session = ASWebAuthenticationSession(     url: URL(string: "https://example.com/oauth/login/authorize")!,     callback: .https(host: "auth.example.com", path: "/auth/callback/example") ) { callbackURL, error in     // Handle the session result. }

## See Also

### Creating callbacks

- [customScheme(_:)](authenticationservices/aswebauthenticationsession/callback/customscheme(_:).md)
