Added solution arcitecture for decrypting notification payload

This commit is contained in:
Karl Ludwig Weise
2026-08-06 16:53:31 +02:00
parent 88ce537653
commit 84bcd25e88
2 changed files with 17 additions and 5 deletions
@@ -67,11 +67,15 @@
const data = stringToEncryptedData(item.metaData?.encryptedPayload);
if (data) {
// decrypted = await $staffCrypto.crypto.decryptStaff({
// data,
// // TODO: Add proper staffKeyShare
// staffKeyShare: "",
// });
// GET /api/tenants/[id]/appointments/tunnels/[tunnelId]/staff-key-share/+server.ts
// Select currently in use passkey staff-key-share OR the first one for now
decrypted = await $staffCrypto.crypto.decryptStaff({
data,
// TODO: Add proper staffKeyShare
staffKeyShare: "",
});
}
}
};
@@ -0,0 +1,8 @@
/*
Return
select encrypted_tunnel_key from client_tunnel_staff_key_share
where user_id = 'userId' and tunnel_id = 'tunnelId'
*/