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:
Pete Hunt 2020-10-04 11:12:47 -07:00 committed by GitHub
parent f2135ab739
commit d0985fe67a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 4419 additions and 18 deletions

View file

@ -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",
{