---
title: "init(url:callbackURLScheme:completionHandler:)"
framework: authenticationservices
role: symbol
role_heading: Initializer
path: "authenticationservices/aswebauthenticationsession/init(url:callbackurlscheme:completionhandler:)-7fpox"
---

# init(url:callbackURLScheme:completionHandler:)

Creates a web authentication session instance.

## Declaration

```swift
init(url URL: URL, callbackURLScheme: String?, completionHandler: @escaping ASWebAuthenticationSession.CompletionHandler)
```

## Parameters

- `URL`: A URL with the http or https scheme pointing to the authentication webpage.
- `callbackURLScheme`: The custom URL scheme that the app requires in the callback URL.
- `completionHandler`: A completion handler the session calls when it completes successfully, or when the user cancels the session.
