How to Add OAuth Login Functionality to an Asp.net Membership website
I have a web application which currently has a bunch of users and use Asp.net
Membership to create and manage users.
I want to add "OAuth" functionality to my application and want to still using ASP.net Membership (login, etc.), and I also want my user login to application with any public social network ID, if that network use a OAuth membership.
How can I use Asp.net and OAuth (open ID开发者_StackOverflow社区
) beside each other?
I also want to add a new page for users to create a profile for themselves.
openid
Take a look at the OpenIDMembershipProvider. Also Nerddinner has OpenID implemented (in MVC not MembershipProvider).
New templates in Visual Studio 2012 has OAuth out of the box. To see how those are implemented, just create sample project.
These templates uses DotNetOpenAuth as a client library: http://www.dotnetopenauth.net
Here is Hansleman's video on new features: http://www.asp.net/vnext/overview/videos/oauth-in-the-default-aspnet-45-templates
http://blogs.msdn.com/b/webdev/archive/2012/08/15/oauth-openid-support-for-webforms-mvc-and-webpages.aspx this link has a project template which shows how you can add oauth functionality to your asp.net membership provider
精彩评论