Возможность переподключения к remote vault

This commit is contained in:
2026-05-17 12:11:53 +03:00
parent f8d4407eb0
commit 15f13577c8
16 changed files with 259 additions and 56 deletions

View File

@@ -85,6 +85,16 @@ class VaultsManager(
yandexAccountStore.deleteByVaultUuid(vaultUuid.toString())
}
override suspend fun retry(vaultUuid: UUID): Boolean = withContext(ioDispatcher) {
val account = yandexAccountStore.getByVaultUuid(vaultUuid.toString()) ?: return@withContext false
yandexAccountStore.updateCredentials(
vaultUuid = account.vaultUuid,
email = account.email,
token = account.oauthToken,
)
true
}
private suspend fun registerYandex(registration: YandexRegistration) {
val token = registration.oauthToken
val info = yandexUserInfoRepository.userInfo(token)