Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dealing with expired auth token android account manager

Should I be invalidating and requesting a new token every time I need to make a request using a Google auth token from the AccountManager or is there an 'expired-at' time stamp I can use to see if it is still valid.

like image 932
Vitaly Babiy Avatar asked Nov 25 '22 09:11

Vitaly Babiy


1 Answers

There is no expiry time provided in the HTTP response from the Google service, so I think you need to ensure that if the auth-token fails to provide access, you use that as the trigger to get a new auth token. Or you could acquire a new token each time the application starts, or create your own timeout.

http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html

like image 76
Ollie C Avatar answered Dec 23 '22 07:12

Ollie C