best practice to handle access token expiry

Feb 5, 2014 at 3:50 AM
This question is in reference with Windows Live Services. What would be the best practice to handle token expiry. There are three alternatives i have come up with:
1) check token status before making an request and handle an expired token accordingly
2) run a thread as soon as a user is logged in and make it sleep for around 3590 seconds and then re-log in automatically.
3) catch the 'access_token_expired' exception and then prompt a silent log in.

Which of these would be the best alternative to use or are there better approach to handle a token expiry?

*A Windows live access token is valid for about an hour(always less than 3600 seconds).
Coordinator
Feb 6, 2014 at 12:42 AM
For any queries regarding Windows Live Services, I would suggest reaching out to the Live Connect forum . The C++REST SDK team may not have the expertise to address such queries.

Thanks
Kavya.