miniflare init

This commit is contained in:
41666 2022-01-27 16:54:37 -05:00
parent 8c07ed3123
commit 688954a2e0
52 changed files with 898 additions and 25 deletions

View file

@ -32,6 +32,7 @@
"@types/react-helmet": "^6.1.2",
"babel-loader": "8.1.0",
"cross-env": "7.0.3",
"exponential-backoff": "^3.1.0",
"ts-loader": "^8.3.0",
"webpack": "4.44.2"
},

View file

@ -160,6 +160,7 @@ export const SessionContextProvider = (props: { children: React.ReactNode }) =>
setLock(false);
} catch (e) {
console.error('syncSession failed', e);
deleteSessionKey();
setLock(false);
}
};
@ -179,7 +180,7 @@ const saveSessionKey = (key: string) => localStorage.setItem('rp_session_key', k
const deleteSessionKey = () => localStorage.removeItem('rp_session_key');
const getSessionKey = () => localStorage.getItem('rp_session_key');
type ServerSession = Omit<SessionData, 'tokens'>;
type ServerSession = Omit<Omit<SessionData, 'tokens'>, 'flags'>;
const fetchSession = async (
authedFetch: SessionContextT['authedFetch']
): Promise<ServerSession | null> => {