diff --git a/Sources/Auth/Deprecated.swift b/Sources/Auth/Deprecated.swift index 73d9800b..8f428c24 100644 --- a/Sources/Auth/Deprecated.swift +++ b/Sources/Auth/Deprecated.swift @@ -5,8 +5,13 @@ // Created by Guilherme Souza on 14/12/23. // +import _Helpers import Foundation +#if canImport(FoundationNetworking) + import FoundationNetworking +#endif + @available(*, deprecated, renamed: "AuthClient") public typealias GoTrueClient = AuthClient diff --git a/Sources/Auth/Storage/AuthLocalStorage.swift b/Sources/Auth/Storage/AuthLocalStorage.swift index 2b28f7e1..e00234cd 100644 --- a/Sources/Auth/Storage/AuthLocalStorage.swift +++ b/Sources/Auth/Storage/AuthLocalStorage.swift @@ -7,14 +7,13 @@ public protocol AuthLocalStorage: Sendable { } extension AuthClient.Configuration { - public static let defaultLocalStorage: AuthLocalStorage = { - #if os(iOS) || os(macOS) || os(watchOS) || os(tvOS) - KeychainLocalStorage( - service: "supabase.gotrue.swift", - accessGroup: nil - ) - #elseif os(Windows) + #if os(iOS) || os(macOS) || os(watchOS) || os(tvOS) + public static let defaultLocalStorage: AuthLocalStorage = KeychainLocalStorage( + service: "supabase.gotrue.swift", + accessGroup: nil + ) + #elseif os(Windows) + public static let defaultLocalStorage: AuthLocalStorage = WinCredLocalStorage(service: "supabase.gotrue.swift") - #endif - }() + #endif }