Skip to content
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

后台权限模式时,超时登录页面异常 #673

Closed
mynetfan opened this issue May 28, 2021 · 3 comments
Closed

后台权限模式时,超时登录页面异常 #673

mynetfan opened this issue May 28, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@mynetfan
Copy link
Collaborator

当projectSetting.permissionMode 为PermissionModeEnum.BACK时,页面菜单和路由会从后台接口取得。
登录之后切换到任意页面,此时如果后台注销了此用户的token或者token过期时,用户直接刷新页面(浏览器F5)会保持当前PATH并重新请求菜单和路由,但此时因为token已失效,必须要求用户重新登录。
该场景下通过setSessionTimeout的方式覆盖登录页面来登录的话,会在登录之后跳过正常登录后获取菜单的流程导致页面缺少菜单和必须的路由。

@mynetfan
Copy link
Collaborator Author

另外,token过期后重新登录时,如果登录的不是同一个用户,期待刷新整个页面而不是仍然保持上一个用户的页面状态。

@mynetfan mynetfan added the bug Something isn't working label May 28, 2021
@M69W
Copy link

M69W commented May 29, 2021

关注,最近做权限也遇到这个问题。

@anncwb anncwb closed this as completed in 132c7fb May 31, 2021
@Mikasa33
Copy link

Mikasa33 commented Jun 1, 2021

👍 感谢您的代码
更新后解决了登录过期,重新登录不加载菜单的问题。
但是还有些小问题。当进入一个列表页时,此时登录过期,会显示 SessionTimeoutLogin 页面,这个时候列表页其实是没加载出数据的,当重新登录后会显示列表页,此时列表页会处于一个没有数据的状态,不会自动刷新列表请求数据。
不知是否有好的解决办法

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants