Working with Re-authentication with AccountManager in a large Android app

I am using AccountManager in a fairly large Android app and I am using Retrofit and Otto to handle REST requests. When the user token no longer works, the 401 error goes back to my REST handler.

I would like the REST handler to be able to show the login activity, but since it is not active, it cannot start the getAuthToken process. My next thought is to send a message back to the calling activity using Otto to inform him that the auth token is no longer working, then trigger that process, which seems to work, but I have a few things to do, and it doesn't seem like getting it right by handling what is widely applied at the activity level.

How do other people deal with it? Are you just breaking the re-authentication code that might be required to re-authenticate the user?

+3
android authentication accountmanager


source to share


No one has answered this question yet

Check out similar questions:

5199
The Ultimate Guide to Form-Based Authentication
3606
Close / hide Android soft keyboard
3295
Why is the Android emulator so slow? How can we speed up the development of an Android emulator?
3288
Correct use cases for Android UserManager.isUserAGoat ()?
2609
Is there a unique identifier for an Android device?
2510
How to persist android activity state by persisting instance state?
2097
Is there a way to run Python on Android?
1858
"Debug certificate expired" error in Android Eclipse plugins
1844
What is "Context" on Android?
54
Shouldn't Android AccountManager store Per-App / UID based OAuth tokens?



All Articles
Loading...
X
Show
Funny
Dev
Pics