bugfix: automatically refresh user's session (#3148)
📝 (App.tsx): Update imports and add new constants for access token expiration time 🔧 (App.tsx): Add support for refreshing access token and setting expiration time 📝 (authAdminGuard/index.tsx): Remove unnecessary logout function and add conditional check for login page 📝 (authGuard/index.tsx): Add conditional check for login page 📝 (constants.ts): Add constants for access token expiration time 📝 (authContext.tsx): Remove logout function and update related logic 📝 (api.tsx): Add conditional check for login page 📝 (use-post-logout.ts): Remove navigate function call 📝 (LoginPage/index.tsx): Add logic to reset flows and selected folder on successful login ✨ (LoginPage/index.tsx): Add support for managing folders in the login page to improve user experience 🔧 (authStore.ts): Update logout function to clear user data and redirect to login page for better security and user experience 📝 (contexts/auth.ts): Remove unnecessary logout function from AuthContextType for consistency 🔧 (vite.config.mts): Add environment variables for ACCESS_TOKEN_EXPIRE_SECONDS and CI to improve configuration flexibility Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
This commit is contained in:
parent
a421a7dfcc
commit
7c75ad0728
12 changed files with 84 additions and 69 deletions
|
|
@ -32,6 +32,10 @@ export default defineConfig(({ mode }) => {
|
|||
},
|
||||
define: {
|
||||
"process.env.BACKEND_URL": JSON.stringify(process.env.BACKEND_URL),
|
||||
"process.env.ACCESS_TOKEN_EXPIRE_SECONDS": JSON.stringify(
|
||||
process.env.ACCESS_TOKEN_EXPIRE_SECONDS,
|
||||
),
|
||||
"process.env.CI": JSON.stringify(process.env.CI),
|
||||
},
|
||||
plugins: [react(), svgr(), tsconfigPaths()],
|
||||
server: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue