Now that the Keychain storage has been abstracted out, we'll need to implement the preferred secure storage protocol for Linux
#if os(Linux)
struct LinuxStorage: Storage {
...
}
#endif
class Keychain: @unchecked Sendable {
/// Initializes the keychain with an overridden accound identifier.
/// - Parameter account: a key indicating the account owner. Ideally, use the application identifier for this value.
public init(_ account: String) {
assert(account.isNotEmpty, "❌ The account identifier cannot be empty.")
#if canImport(Security)
self.storage = DefaultStorage(account: account)
#elseif os(Android)
// TODO: Android storage not implemented
#elseif os(Linux)
self.storage = LinuxStorage(account: account)
#endif
}
}
Now that the Keychain storage has been abstracted out, we'll need to implement the preferred secure storage protocol for Linux