mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Persistent rooms via Firebase (#2188)
* Periodically back up collaborative rooms in firebase * Responses to code review * comments from code review, new firebase credentials
This commit is contained in:
parent
f2135ab739
commit
d0985fe67a
14 changed files with 4419 additions and 18 deletions
|
@ -89,7 +89,7 @@ const generateEncryptionKey = async () => {
|
|||
return (await window.crypto.subtle.exportKey("jwk", key)).k;
|
||||
};
|
||||
|
||||
const createIV = () => {
|
||||
export const createIV = () => {
|
||||
const arr = new Uint8Array(12);
|
||||
return window.crypto.getRandomValues(arr);
|
||||
};
|
||||
|
@ -108,7 +108,7 @@ export const generateCollaborationLink = async () => {
|
|||
return `${window.location.origin}${window.location.pathname}#room=${id},${key}`;
|
||||
};
|
||||
|
||||
const getImportedKey = (key: string, usage: KeyUsage) =>
|
||||
export const getImportedKey = (key: string, usage: KeyUsage) =>
|
||||
window.crypto.subtle.importKey(
|
||||
"jwk",
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue