post migration

This commit is contained in:
Kyle Spearrin 2019-06-03 15:44:05 -04:00
parent 6b68e85077
commit 0e3eeab828

View file

@ -173,15 +173,18 @@ namespace Bit.App.Migration
var pinProtectedKey = await cryptoService.EncryptAsync(oldKeyBytes, pinKey); var pinProtectedKey = await cryptoService.EncryptAsync(oldKeyBytes, pinKey);
await storageService.SaveAsync(Constants.PinProtectedKey, pinProtectedKey.EncryptedString); await storageService.SaveAsync(Constants.PinProtectedKey, pinProtectedKey.EncryptedString);
} }
// Post migration tasks
await cryptoService.ToggleKeyAsync(); await cryptoService.ToggleKeyAsync();
await storageService.SaveAsync(Constants.LastActiveKey, DateTime.MinValue);
await lockService.CheckLockAsync();
// Remove "needs migration" flag // Remove "needs migration" flag
settingsShim.Remove(Constants.OldUserIdKey); settingsShim.Remove(Constants.OldUserIdKey);
Migrating = false; Migrating = false;
messagingService.Send("migrated"); messagingService.Send("migrated");
await lockService.CheckLockAsync();
var task = Task.Run(() => syncService.FullSyncAsync(true)); var task = Task.Run(() => syncService.FullSyncAsync(true));
return true; return true;
} }
} }