How can the front-end page written with vue check whether the same account is logged in twice?

to use vue to develop system-based pages, in order to control user permissions and enhance security, it is required that if an account logs in once and is online, the previous account is automatically logged off when logging in again using this account. At present, the data provided to me by the backend are the login ID, "s last login time and whether the data provided by the login IP, can be realized, and how to use vue to monitor whether the account needs to be offline

Mar.05,2021
The function of

is generally controlled by the backend. When the same account logs in again, the session or token that was successfully logged in last time is set to invalidate. What cannot be done at the front end of regenerating a new


is to let the backend return whether you are offline


server, single sign-on control. With the token valid for the last communication


as the front end, I am an interface tuner. I will give you whatever uplink parameters you want for the interface. How does the front end kick the user? The back-end interface tells me that the current user has been kicked, and I will clear the front-end variables for you to jump to the landing page. What else can the front-end do? Is it difficult to send a broadcast to the other end when the user logs in, let them check whether it is a duplicate user and then trigger the offline logic? Of course, it's up to the back end to judge for yourself, and you don't have to do anything. Once the client that is kicked moves again, the next trigger request will automatically call to the landing page.


APIs should have login authentication. The front end makes a unified intercept and jumps to the login page after being logged out. Click a prompt

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ead8ed-47f48.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ead8ed-47f48.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?