mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-28 02:54:34 +00:00
ios: digital password (instead of device auth) (#2169)
* ios: digital password (instead of device auth) * set, ask, change password * kind of working, sometimes * ZSTack * fix cancel * update title * fix password showing after settings dismissed * disable button when 16 digits entered * fixes * layout on larger screens * do not disable auth when switching to system if system auth failed, refactor * fix enabling auth via the initial alert * support landscape orientation
This commit is contained in:
@@ -30,7 +30,7 @@ public func chatMigrateInit(_ useKey: String? = nil, confirmMigrations: Migratio
|
||||
logger.debug("chatMigrateInit generating a random DB key")
|
||||
dbKey = randomDatabasePassword()
|
||||
initialRandomDBPassphraseGroupDefault.set(true)
|
||||
} else if let key = getDatabaseKey() {
|
||||
} else if let key = kcDatabasePassword.get() {
|
||||
dbKey = key
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ public func chatMigrateInit(_ useKey: String? = nil, confirmMigrations: Migratio
|
||||
let cjson = chat_migrate_init(&cPath, &cKey, &cConfirm, &chatController)!
|
||||
let dbRes = dbMigrationResult(fromCString(cjson))
|
||||
let encrypted = dbKey != ""
|
||||
let keychainErr = dbRes == .ok && useKeychain && encrypted && !setDatabaseKey(dbKey)
|
||||
let keychainErr = dbRes == .ok && useKeychain && encrypted && !kcDatabasePassword.set(dbKey)
|
||||
let result = (encrypted, keychainErr ? .errorKeychain : dbRes)
|
||||
migrationResult = result
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user