Closed kalobkalob closed 9 years ago
Might be related to https://github.com/natebenson/vyllage/issues/454
It's not a bad idea to have the front end display a banner notification when it stops pinging the back end.
Is the session meant to expire even if the front-end is pinging the back-end during inactivity? If so, we have to handle 401 errors across all front-end requests.
I think the front end pings for up to one hour, so after that might be good...
The problem wasn't the inability to save, it's the lack of any indication that the session has ended. This would lead the user to believe that the site is broken.
The main problem comes down to the page just refreshing and clearing any changes without any indication of anything wrong. Either notify that the session has expired or redirect to the login page.
Right. I think redirecting to the login page with the appropriate error message is best. Also, I was thinking it would be better if the back-end would handle the redirection upon session expiration. Just some thoughts.
When the session expires any action should redirect you to login, maybe the way we are posting prevents that?
on /account/ping
request when it returns rather than 200 then we can just redirect it to logout .
@nelonoel how you want to show the messages on the login page after the redirection ?
You could just use the same message when the user logouts I think, check /logout's parameter to get it.
^ That. Maybe say something like: "Your session has expired. Please login to continue."
And hope they don't have any unsaved changes?
for unsaved changes , we can use LocalStorage to store temp data and when its in resume page then we can check if it has temp data , then send it to the edit mode . @tylerbenson is there any other option we can use ?
Haha, check out https://github.com/natebenson/vyllage/issues/453
It just hasn't been high enough priority to worry about. You think we should do it now?
we can do the LocalStorage part later . I'm changing the message .
I was unable to save changes when editing my profile. Let the browser session expire through inactivity. Best thing would probably be a notification that the session has expired and the user needs to relogin.