From d153f202e6ea07982a098692817d377801f5adf3 Mon Sep 17 00:00:00 2001 From: Elias Schneider Date: Tue, 11 Oct 2022 10:22:10 +0200 Subject: [PATCH 1/2] fix: refresh token on visit after 15 minutes --- frontend/src/pages/_app.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/_app.tsx b/frontend/src/pages/_app.tsx index 5af23cd..60424a7 100644 --- a/frontend/src/pages/_app.tsx +++ b/frontend/src/pages/_app.tsx @@ -37,6 +37,7 @@ function App( const getInitalData = async () => { setIsLoading(true); + await authService.refreshAccessToken(); setUser(await userService.getCurrentUser()); setIsLoading(false); }; @@ -47,7 +48,7 @@ function App( }, []); useEffect(() => { - setCookies("mantine-color-scheme", systemTheme, { + setCookies("color-schema", systemTheme, { maxAge: 60 * 60 * 24 * 30, }); setColorScheme(systemTheme); @@ -90,6 +91,6 @@ export default App; App.getInitialProps = ({ ctx }: { ctx: GetServerSidePropsContext }) => { return { - colorScheme: getCookie("mantine-color-scheme", ctx) || "light", + colorScheme: getCookie("color-schema", ctx) || "light", }; }; From 237733b53fef3c527cb174106c38d2c6276f3fd4 Mon Sep 17 00:00:00 2001 From: Elias Schneider Date: Tue, 11 Oct 2022 10:24:08 +0200 Subject: [PATCH 2/2] chore: update readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d454e98..c4cacc2 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ Demo: https://pingvin-share.dev.eliasschneider.com ## ⌨️ Setup +> Pleas note that Pingvin Share is in early stage and could include some bugs + 1. Download the `docker-compose.yml` and `.env.example` file. 2. Rename the `.env.example` file to `.env` and change the environment variables so that they fit to your environment. If you need help with the environment variables take a look [here](#environment-variables) 3. Run `docker-compose up -d`