feature: add secured message

- encrypt/decrypt every message (require ^0.0.2)

Signed-off-by: pakintada@gmail.com <Pakin>
This commit is contained in:
pakintada@gmail.com 2026-06-16 10:34:29 +07:00
parent 4ca8b3b270
commit 2a0841a798
14 changed files with 314 additions and 147 deletions

View file

@ -97,8 +97,8 @@
websocketConnectedForUid = currentUser.uid;
console.log('connect ws after auth ready');
void currentUser.getIdToken().then((idToken) => {
connectToWebsocket(idToken);
void currentUser.getIdToken(true).then(async (idToken) => {
await connectToWebsocket(idToken);
});
}

View file

@ -58,9 +58,9 @@
}
});
function sendGetRecipeVersions(country: string) {
async function sendGetRecipeVersions(country: string) {
version_list = [];
sendMessage({
await sendMessage({
type: 'recipe_versions',
payload: {
auth: '',