Home > front end > Consult! How do you make account login not expired front end
Consult! How do you make account login not expired front end
Time:12-13
Set up 30 minutes after the end, account login is outdated, say now to the login page for a long time, don't expire login, my side front how to run it, I don't understand this principle
CodePudding user response:
I only set up the operation will not expire, is in a fog out, if the user is not operating, 30 minutes will be expired, how do I let him not expired
CodePudding user response:
Front end what all need not stem, let every time the backend access interface, the expiration time in the redis update can be
CodePudding user response:
In general the back-end failure time each time the state of the need to log in to set the interface request will update the expiry time, so the front as long as the judge when expiring sends a request to this backend will update the expiration time again for half an hour
CodePudding user response:
Specific idea is to intercept the ajax request, set a delay timer, every request to remove the reset, the content of the decelerator is to send a request to update the expiration time
CodePudding user response:
This pot to jilt to the back-end, because every time you request to the backend token, expired, you can't pull the data, so you still need to log back in,
CodePudding user response:
The refresh token, expiring, to refresh the excuse to request a new token
CodePudding user response:
Depends on what you are overdue mechanism, if the auth, that is the refresh token, it is a set of standard processes, you baidu "auth2 refresh token" a pile of plan, if it is a more traditional cookie mechanism, you baidu "cookie refresh to keep expired"
CodePudding user response:
Overdue as required, such as must have an expiration date
CodePudding user response:
Let the back-end set the expiration time is long, or refresh every time to go, is the back-end control date
CodePudding user response:
Polling an ajax request, constantly refresh the server of the last access time