-
Notifications
You must be signed in to change notification settings - Fork 3.6k
fix: show login when session token expires #5439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: show login when session token expires #5439
Conversation
ramiresviana
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the logout is happening without user interaction, adding a message to inform the user they’ve been logged out would make the behavior clearer. Also, please ensure the code passes linter checks by running pnpm run lint to avoid errors when this PR is merged.
Perfect, I made that change and I had no problems with |
ramiresviana
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to fix the lint warnings
frontend > pnpm run lint
> filebrowser-frontend@3.0.0 lint /home/filebrowser/frontend
> eslint src/
/home/filebrowser/frontend/src/types/user.d.ts
66:40 warning Insert `⏎` prettier/prettier
/home/filebrowser/frontend/src/utils/auth.ts
27:14 warning Replace `'inactivity'` with `"inactivity"` prettier/prettier
116:7 warning Insert `·` prettier/prettier
117:20 warning Delete `·` prettier/prettier
118:24 warning Delete `·` prettier/prettier
119:43 warning Insert `,` prettier/prettier
122:20 warning Delete `·` prettier/prettier
125:6 warning Delete `⏎····` prettier/prettier
/home/filebrowser/frontend/src/views/Login.vue
6:55 warning Replace `{{t(`login.logout_reasons.${reason}`)}}` with `⏎········{{·t(`login.logout_reasons.${reason}`)·}}⏎······` prettier/prettier
74:28 warning Replace `'logout-reason'` with `"logout-reason"` prettier/prettier
130:10 warning Insert `⏎` prettier/prettier
✖ 11 problems (0 errors, 11 warnings)
0 errors and 11 warnings potentially fixable with the `--fix` option.
…res' of https://github.com/ArielLeyva/filebrowser into fix/filebrowser#5212-show-login-when-session-token-expires
Code has been reformatted to comply with Prettier's guidelines. |
hacdias
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you both!
…th with custom logout is used
…th with custom logout is used
Closes #5212
Description
Implements automatic frontend redirection to the login page when the authentication token expires, based on the backend’s token-expiration-time setting.
Checklist
Before submitting your PR, please indicate which issues are either fixed or closed by this PR. See GitHub Help: Closing issues using keywords.
masterbranch.