Add missing store calls (#59)

This commit is contained in:
Leendert de Borst
2024-06-24 19:37:48 +02:00
parent bd0d4ad2a4
commit 4e2bf10115
2 changed files with 8 additions and 0 deletions

View File

@@ -86,6 +86,9 @@
if (tokenObject != null)
{
// Store the encryption key in memory.
AuthService.StoreEncryptionKey(passwordHash);
// Store the token as a plain string in local storage
await AuthService.StoreAccessTokenAsync(tokenObject.Token);
await AuthService.StoreRefreshTokenAsync(tokenObject.RefreshToken);

View File

@@ -135,6 +135,11 @@
// 5. Client verifies proof.
Srp.VerifySession(clientEphemeral.Public, clientSession, validateLoginResponse.ServerSessionProof);
// Store the changed access/refresh tokens in local storage.
await AuthService.StoreAccessTokenAsync(validateLoginResponse.Token.Token);
await AuthService.StoreRefreshTokenAsync(validateLoginResponse.Token.RefreshToken);
// Store the encryption key in memory.
AuthService.StoreEncryptionKey(passwordHash);