mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-26 02:01:02 +00:00
Make keychain account accessible after first unlock
This commit is contained in:
parent
7bbe3cbc41
commit
79c9ef4153
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue