Home > Back-end >  2020-01-15: user login, save 30 days free, only allows two devices login, if there is a third device
2020-01-15: user login, save 30 days free, only allows two devices login, if there is a third device

Time:01-16

2020-01-15: user login, save 30 days free, only allows two devices login, if there is a third device login, kicked off the first, to change the password, all equipment need to logoff, how this logic implementation? # # f greatly architects a daily topic

CodePudding user response:

If you use the redis, this process has little difficulty;
Redis token set the expiration time for 30 days, free by the client with the same token,
As to guarantee the most N equipment online at the same time, change to the data level is the token of failure or eliminate, advice in the generated token, add related time or successively tag, directly out of the token;

CodePudding user response:

Upstairs positive solutions. And generally large projects will configure and use redis cache database... Realize the function of the building Lord says is quick and easy
  • Related