I can’t find any examples of using DotNetOpenAuth to refresh an expired Access Token. Most providers don’t use expiring tokens, however Yahoo is a big one that expires their tokens in one hour.
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yahoo does use OAuth 1.0, so I figured out how to do it manually:
First, I try to use the token I have saved in my database. If I get a 401 Unauthorized error, I call my RefreshYahooAccessToken() method, and try again.
Note: I have my own implementation of a TokenManager that stores my access tokens in a database, as well as any extra data associated with the token (YahooGUID, and oauth_session_handle) which is given to me in Yahoo’s get_token Response Parameters, but you can easily modify it to work with a different TokenManager implementation.
Here’s my working version: