refactor: obfuscated pincode in transit

This commit is contained in:
Carlos Valente
2024-03-15 17:22:18 +01:00
committed by Carlos Valente
parent 3fdb1bd1c8
commit 4e6b833e10
7 changed files with 79 additions and 8 deletions
@@ -26,7 +26,6 @@ export const AppContextProvider = ({ children }: PropsWithChildren) => {
useEffect(() => {
if (status === 'pending') return;
if (!data) return;
const previousEditor = sessionStorage.getItem(storageKeys.editor);
if (previousEditor && previousEditor === data.editorKey) {
@@ -53,10 +52,6 @@ export const AppContextProvider = ({ children }: PropsWithChildren) => {
return savedPin == null || savedPin === '' || pin === savedPin;
}
if (!data) {
return false;
}
if (permission === 'editor') {
const correct = isValid(pin, data.editorKey);
if (correct) {