Add logout function
Issue #51
closed
Add a logout function to the application.
Comments (6)
-
-
How's this going?
-
reporter I need to do some fixing to the code. currently, when I click logout, I can click the back button and it goes back to the previous page. I need to fix the code to close all activivties.
-
Ref
#51Add rudimentary log out feature, @brandonthai will have to improve it.→ <<cset 23ef0a94f290>>
-
Now that the UI is navigation drawer driven and has a single containing activity, all you have to do is finish the navigation drawer activity.
I've already included the code to do this, you just have to add a few things noted in the comments here:
-
- changed status to closed
[Close
#51] Added log out.→ <<cset 628f98eb7aef>>
- Log in to comment
How's this going?
By the way, just to help you out.. this is the method you will need to "log the user out".
Logging the user out is really just destroying the locally stored access token:
https://bitbucket.org/galacticos/baibai_android_app/src/2e2508c93b5d62648787fd1fd63cee6cfc578f8c/app/src/main/java/com/baibai/androidapp/services/AuthService.java?at=master#cl-19
And if you want to get fancy, you can also revoke the token using this endpoint:
Looks like the endpoint expects the token to be passed as POSTDATA:
token=accesstokenhere
You should put the call to that endpoint in the destroyCredentials method in the above link.