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

Vuex的使用方式无法持续性管理用户信息 #15

Open
XiaofengZeng opened this issue Mar 18, 2022 · 0 comments
Open

Vuex的使用方式无法持续性管理用户信息 #15

XiaofengZeng opened this issue Mar 18, 2022 · 0 comments

Comments

@XiaofengZeng
Copy link
Owner

description:

当前用户鉴权使用Vuex进行管理,但只是在actions中进行逻辑验证,并在mutations中将验证信息写入store中,同时写入浏览器的localStorage中。
当浏览器刷新后,因为浏览器的localStorage存储了原先的验证信息,将会自动通过鉴权,并跳转至主页。但Vuex将被重置,验证信息将被清空。
这样不利于后续持续性管理用户信息。

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

No branches or pull requests

1 participant