سؤال

I am writing an application in .net which will help users to get their Google Reader subscription lists.

I was thinking of using DotnetOpenAuth for authentication and then get google auth token. The users will enter google credentials on Google site and finally they will be redirected to my application with auth token. Now using this auth token I was planning to make a request to google reader endpoint which returns the subscriptions list as an opml file.

Do anyone has any idea? Please share.

هل كانت مفيدة؟

المحلول

I wrote a DotNetOpenAuth client for Google that uses OAuth2. You should be able to use this to get the auth token back.

https://github.com/mj1856/DotNetOpenAuth.GoogleOAuth2

If you use the new OAuthWebSecurity classes from Microsoft.AspNet.WebPages.OAuth, then you will fine the Google access token returned to you in the results from the OauthWebSecurity.VerifyAuthentication in your callback method.

UPDATE - The above answer is specifically with regard to DotNetOpenAuth in MVC4. MVC5 does not use DotNetOpenAuth, and comes with a Google OAuth solution already.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top