页面本地存储的token应该带有规范的key名 #45
Labels
No Label
area/smartpanel
bug
done-waiting-confirmed
kind/feature
page/admin
page/simplepage
page/tab-admin
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: smartoilets-front/projects#45
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
目前直接使用的是 "token", 应该使用对应的key, 否则会将其他不相关页面的token拿来使用,导致异常.
规则可以是这样: "smt:token:{page}", eg: smt:token:tab , smt:token:simplepage
很快将会有一个新的 login API, 会返回token的过期时间, 前端在使用前需要检查下是否过期,如果过期了需要获取新的token.
已经更换了 key 了
@ginfone 如果不是按照issue实现的记得说一下,token规则替换为了 token-{pagetype}, 而不是issue中描述的 smt:token:{page} , 能够满足需求,因此关闭issue
重新打开,需要确认一点
https://smartoilets.net/tab/admin/settings/twsc/4A/male 和 https://smartoilets.net/tab/home/twsc/4A/male
前端本地存储的token是不一样的,虽然都是tab页面,但admin端是用户手动登录的,而home端是匿名页面。