SHA256
30 03 25
Сделал адекватное отображение ключей / и при регистрации ключи спрашивают какие сохранять (что то работает что то сложно)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
decryptJsonWithStoragePwd,
|
||||
encryptJsonWithStoragePwd,
|
||||
} from './crypto-utils.js?v=20260327192619';
|
||||
} from './crypto-utils.js?v=20260330001044';
|
||||
|
||||
const DB_NAME = 'shine-ui-auth';
|
||||
const DB_VERSION = 1;
|
||||
@@ -76,3 +76,12 @@ export async function saveSessionMaterial(login, material) {
|
||||
export async function loadSessionMaterial(login) {
|
||||
return get(STORE_SESSIONS, login);
|
||||
}
|
||||
|
||||
export async function clearClientAuthData() {
|
||||
await new Promise((resolve, reject) => {
|
||||
const request = indexedDB.deleteDatabase(DB_NAME);
|
||||
request.onsuccess = () => resolve();
|
||||
request.onerror = () => reject(request.error || new Error('Не удалось очистить IndexedDB'));
|
||||
request.onblocked = () => reject(new Error('Очистка IndexedDB заблокирована открытыми соединениями'));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user