diff --git a/Sources/OAuthenticator/WebAuthenticationSession+Utility.swift b/Sources/OAuthenticator/WebAuthenticationSession+Utility.swift index fb4f6ae..a23ad5b 100644 --- a/Sources/OAuthenticator/WebAuthenticationSession+Utility.swift +++ b/Sources/OAuthenticator/WebAuthenticationSession+Utility.swift @@ -1,9 +1,11 @@ -#if canImport(AuthenticationServices) -import AuthenticationServices +// It is not 100% clear why a plain import of "AuthenticationServices" does not work here, +// but in some cases/configuration it appears to fail. +#if canImport(_AuthenticationServices_SwiftUI) +import _AuthenticationServices_SwiftUI import SwiftUI -@available(macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4, *) +@available(macOS 13.3, iOS 16.4, macCatalyst 16.4, watchOS 9.4, tvOS 16.4, *) extension WebAuthenticationSession { public func userAuthenticator(preferredBrowserSession: BrowserSession? = nil) -> Authenticator.UserAuthenticator { return {