customScheme(_:)
Creates a callback object that matches against URLs with the given custom scheme.
Declaration
class func customScheme(_ customScheme: String) -> SelfParameters
- customScheme:
The custom scheme that the app requires in the callback URL.
Discussion
The following example creates a session that requires a callback with a custom URL scheme:
let session = ASWebAuthenticationSession(
url: URL(string: "https://example.com/oauth/login/authorize")!,
callback: .customScheme("myappscheme")
) { callbackURL, error in
// Handle the session result.
}