Subclassing ASWebAuthenticationSession.Callback not working

Hi, Trying to upgrade our SSO login with url and not uriScheme using ASWebAuthenticationSession.init(url:, callback:, completionHandler:)

Problem is the documentation is very basi so I was trying to experiemnt and ran into a weird bug ... apparently if I subclass ASWebAuthenticationSession.Callback like this:

class CustomThingie: ASWebAuthenticationSession.Callback {
    override func matchesURL(_ url: URL) -> Bool {
        PLogDebug("CustomThingie - match url: \(url) - does match? \(super.matchesURL(url))")
        return super.matchesURL(url)
    }
}

The session black box thingie does nothing. That is "do you want to login ..." does not appear, nor any web modal.

session.start() does nothing when:

session = ASWebAuthenticationSession(
                url: editedUrl,
                callback: CustomThingie.customScheme(uriScheme),
                completionHandler: onComplete
            )

session.start() works fine when:

session = ASWebAuthenticationSession(
                url: editedUrl,
                callback: .customScheme(uriScheme),
                completionHandler: onComplete
            )

Any insights why is it so?

Regards, Martynas

Subclassing is not supported for this type. If you just want to match an https URL rather than a custom scheme, use the .https(host:path:) method. If you're trying to implement something else that's not currently supported, we'd love to hear about it.

Subclassing ASWebAuthenticationSession.Callback not working
 
 
Q