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

Bug: 关于路由守卫的问题 #5313

Open
5 tasks done
fiorayang opened this issue Jan 6, 2025 · 0 comments
Open
5 tasks done

Bug: 关于路由守卫的问题 #5313

fiorayang opened this issue Jan 6, 2025 · 0 comments

Comments

@fiorayang
Copy link

fiorayang commented Jan 6, 2025

Version

Vben Admin V5

Describe the bug?

image
这里是否考虑捕获一下获取用户信息异常的处理,不然可能导致用户信息获取失败的情况下(token失效或其他业务code失败处理)依旧执行后续逻辑,导致accessStore.isAccessChecked被错误的标记为true,使得用户下一次登陆无法处理正确的权限。

Reproduction

简要步骤
token失效 -> 获取用户信息401 -> 重定向到授权页 -> 因未捕获错误继续执行后续权限处理逻辑 -> accessStore.isAccessChecked被标记为true -> 页面被重定向到授权页 -> 用户执行登陆 -> 因accessStore.isAccessChecked为true跳过权限的处理 -> 权限异常

System Info

System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Pro
    Memory: 140.23 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.0.0 - /usr/local/bin/node
    npm: 10.2.0 - /usr/local/bin/npm
    pnpm: 9.15.1 - /usr/local/bin/pnpm
  Browsers:
    Chrome: 131.0.6778.205
    Safari: 17.5

Relevant log output

No response

Validations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant