Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Login menu item to "Log out" when the user is logged in. #18

Closed
murraycu opened this issue Apr 13, 2015 · 1 comment
Closed

Change Login menu item to "Log out" when the user is logged in. #18

murraycu opened this issue Apr 13, 2015 · 1 comment

Comments

@murraycu
Copy link
Owner

The "Login" menu item doesn't change after the user is logged in. This seems to have made at least one person think that the login was not successful. (There is already a brief "Logged in" message after logging in and every time you open the app, to partly help with this.)

This (awkward anyway) branch tries to change it to "Log out" when we are logged in, but the menu of the current activity doesn't get updated yet:
https://github.com/murraycu/android-galaxyzoo/tree/show-log-out

Note also that there's no way to know when the login becomes invalid, for instance if the user changes their password on the website. That's a server bug that we can't do anything about in the client:
zooniverse/Galaxy-Zoo#184

murraycu added a commit that referenced this issue May 21, 2015
By asynchronously caching the login status (async because we are asking
the AccountManager, not being we are asking the server) in onResume()
and using that in onPrepareOptionsMenu().
However, this will incorrectly show the user as logged in if they
change their password on the web server - clients have no way
to check that the api_key is still valid, even when using the api_key
to submit a classification:
zooniverse/Galaxy-Zoo#184

This fixes this issue:
#18
murraycu added a commit that referenced this issue May 21, 2015
By asynchronously caching the login status (async because we are asking
the AccountManager, not being we are asking the server) in onResume()
and using that in onPrepareOptionsMenu().
However, this will incorrectly show the user as logged in if they
change their password on the web server - clients have no way
to check that the api_key is still valid, even when using the api_key
to submit a classification:
zooniverse/Galaxy-Zoo#184

This fixes this issue:
#18
@murraycu
Copy link
Owner Author

murraycu commented Jul 7, 2015

This was fixed by this commit: 34a2414

However, due to this bug with the server, we cannot know when your login has become invalidated, for instance if you change your password, or if the server's auth key is for a limited time (as it should be): zooniverse/Galaxy-Zoo#184

@murraycu murraycu closed this as completed Jul 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant