Make keychain account accessible after first unlock
This commit is contained in:
parent
7bbe3cbc41
commit
79c9ef4153
|
@ -16,7 +16,7 @@ public extension AppAccount {
|
|||
func save() throws {
|
||||
let encoder = JSONEncoder()
|
||||
let data = try encoder.encode(self)
|
||||
Self.keychain.set(data, forKey: key)
|
||||
Self.keychain.set(data, forKey: key, withAccess: .accessibleAfterFirstUnlock)
|
||||
}
|
||||
|
||||
func delete() {
|
||||
|
@ -33,6 +33,7 @@ public extension AppAccount {
|
|||
if let data = keychain.getData(key) {
|
||||
if let account = try? decoder.decode(AppAccount.self, from: data) {
|
||||
accounts.append(account)
|
||||
account.save()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue