ohmage / gwt-front-end

The javascript/GWT code behind the front end.
6 stars 2 forks source link

signout button doesn't sign out... The page seems to be loading but nothing happens #273

Closed hongsudt closed 11 years ago

hongsudt commented 11 years ago

This is on firefox. I clicked sign out button on otest, it didn't get me anywhere. But you could see that the page is loading/waiting/spinning. While it is spinning, when I clicked home, it gave me unable to contact server..

jeroen commented 11 years ago

Related problem: in firefox, when you press F5 anywhere in the front-end, the front-end runs into an infinite loop sending thousands of /app/user/logout calls to the server.

When is it logging out when you refresh the page?

jshslsky commented 11 years ago

@hongsudt can you try clearing your browser cache and retrying?

@jeroenooms I added GWT hooks for onWindowClose() to remove the cookie. I think this is a side-effect of that fix.

stevenolen commented 11 years ago

It looks like that hook causes users to get logged out as soon as they refresh the page in chrome. Not an expected action I'd like (not sure about others).

jshslsky commented 11 years ago

I'll fix. On travel today and tomorrow.

jeroen commented 11 years ago

No need for onWindowClose handlers. The user can have multiple tabs open with ohmage pages or dashboards. If he closes one tab, it shouldn't log out all of them.

jshslsky commented 11 years ago

There is another thread where we concluded that the cookie should be removed when the user closed the tab or window. It has to do with users on public computers and sensitive data.

jshslsky commented 11 years ago

cens/ohmageFrontEnd#265

jeroen commented 11 years ago

Ok, see my comment in https://github.com/cens/ohmageFrontEnd/issues/265. The way to do this is by means of the cookie expiration settings.

jojenki commented 11 years ago

I know this is about logout, but the onWindowClose handler is causing me some issues as well. If I type in a new address, even if it is on the same domain but to a different web app, it seems to be deleting the key. I commented out the associated code and redeployed the front end, and it started working.

jshslsky commented 11 years ago

Can people retest this on FF? It is working for me now, but I need other people to test. http://test.ohmage.org

stevenolen commented 11 years ago

Works for me :-D tested on FF and chrome. a bunch of times each!

jshslsky commented 11 years ago

Great! I think this issue re-presented itself because of the onWindowClosing() "fix" I did and then undid.