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