feat: remove unused util

This commit is contained in:
2025-05-25 14:54:24 +02:00
parent 476b9a13d9
commit 491c9a824d

View File

@ -1,30 +0,0 @@
import { deriveDeviceKey, getDeviceId } from "./deviceId";
import { encryptToken } from "./token";
const storeTokensForAccount = async (
accountId: string,
accessToken: string,
refreshToken: string
) => {
const deviceKeyId = await getDeviceId();
const key = await deriveDeviceKey(deviceKeyId);
const access = await encryptToken(accessToken, key);
const refresh = await encryptToken(refreshToken, key);
const entry = {
accountId,
label: `Account for ${accountId}`,
access: {
data: Array.from(new Uint8Array(access.cipherText)),
iv: Array.from(access.iv),
},
refresh: {
data: Array.from(new Uint8Array(refresh.cipherText)),
iv: Array.from(refresh.iv),
},
updatedAt: new Date().toISOString(),
};
// Save this `entry` in IndexedDB (or use a localforage wrapper)
};