Is there an ASP.MVC 3 sample project or nuget package for Open ID / Facebook / Live authentication? - asp.net-mvc

Before I reinvent the wheel, ASP.Net MVC 3 Tools Update includes an Internet Application (with Forms based login) and Intranet Application (with Active Directory login) does anyone have an MVC 3 project template, or controller/model, or Nuget package for Open ID / Facebook / MS live based logins?
I'm capable of tracking down the API libraries for Facebook, Yahoo, Google and Microsoft and building my own, but before I start from scratch, I just wanted to see if someone already had a starter project or Nuget package that implemented that form of authentication. I'd rather support that project than start my own if I could.
Thanks :-)
Dan

Try DotNetOpenAuth

Nuget.org has a gallery you can explore. Searching for OpenID and Facebook showed several packages that will likely get you close to what you want. I'm not sure you will find a package that does them all but you should be able to grab them individually and then setup something in your code to allow logins from each.
http://nuget.org/List/Search?packageType=Packages&searchCategory=All+Categories&searchTerm=openid&sortOrder=package-download-count&pageSize=10
http://nuget.org/List/Search?packageType=Packages&searchCategory=All+Categories&searchTerm=facebook&sortOrder=package-download-count&pageSize=10
Here's how someone tackled the traversing of logins to one auth store in his system....

Related

Not able to access my MVC 5 web application after adding MS Identity

I created my app using a template. After that i managed to connect it with an existing database. Then i tried to add Identity so that i will be able to authorise and authenticate users of the application. I tried to do that following the instructions of "shyamal parikh" in this post Adding ASP.NET MVC5 Identity Authentication to an existing project
My problem is that now i get a 401 error unless i got to solution explorer (in VS) and disable the windows authentication. But when i do that all the users have unrestricted access to the whole application.
I assume that the problem has to do with that solution that i performed but i cant comment directly there.
Can anyone give me a hint as to what i might be doing wrong?
Do you have windows authentication installed on your computer? Maybe adding that might help. Here are the instructions-
https://www.iis.net/configreference/system.webserver/security/authentication/windowsauthentication/providers/add
Also look at your event viewer, you might have some hints there.

Steam OpenId in MVC application

I have never done an openid application before. I did see that MVC 5 has some built in oauth sign ins. I was able to get these to work no problem, as they are already built.
But I am completely unsure how to get the steam openid to work in MVC. Does anyone have some sample code of there MVC Steam OpendID stuff? Or does anyone know a good tutorial for this?
Go to Tools > Library Package Manager > Package Manager Console and type:
Install-Package Owin.Security.Providers
Open your App_Start\Startup.Auth.cs, and add:
using Owin.Security.Providers.Steam;
Then, in the ConfigureAuth method, add:
app.UseSteamAuthentication("your API key");
You can get an API key from http://steamcommunity.com/dev.
A "Steam" button should be added to your login page.
Here is an excellent tutorial on how to integrate openid with ASP.NET MVC, and it do have working code, and instructions. Please have a look and get going.
http://weblogs.asp.net/haithamkhedre/archive/2011/03/13/openid-authentication-with-asp-net-mvc3-dotnetopenauth-and-openid-selector.aspx
Hope this helps.

Implementing twitter login in Symfony 1.4 without sfGuard

I've an existing project in symfony 1.4. Worse thing, project is not using sfGuard plugin but implemented custom user authentication.
As a new feature requirement, client requested to add login with twitter support in the app.
I went through twitter PHP libs which seems do not fit for symfony 1.4 without some level of customization.
I also went with one Symfony plugin (sorry but forget the link) but it also do not meet my requirements as (I guess) it is tightly coupled with sfGuard.
I started customizing tmhOAuth to match my requirements but I'd like to ask; is there is any symfony 1.4 plugin for twitter, which do not depends on sfGuard?

WebMatrix social authentication MVC integration

Is there any article or ideas how to use/move/intergrate social authentication from WebMatrix 2 to MVC 4. I've googled internet but didn't found any info about possibility to add references to WebMatrix namespaces/libraries to MVC project. I've read following article http://www.asp.net/webmatrix/tutorials/the-top-features-in-web-pages-2-developer-preview#oauthsetup and want to use WebMatrix.Security in MVC project
If you're looking to upgrade your project from simple ASP.NET Razor pages to a full MVC 4 project, I recommend moving from WebMatrix to Visual Web Developer:
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-web-developer-express
Everything you're trying to do here with the social auth libraries should work perfectly well in VS, and there are even a few NuGet packages that can make it easy. WebMatrix is meant to get you running with ASP.NET and Razor, but VS is going to give you a fuller experience.
Happy Coding!
here you will find a step by step solution to migrate webmatrix-webpages apps into asp.net mvc. check that you can find the login area - were you will figure out the social auth login too - in order to migrate it to mvc too.
information:
The Web Pages page-centric programming model supported by WebMatrix is a great way to get Web apps up and running. If you later decide that embracing ASP.NET MVC would give you more flexibility, you're covered. We’ll explain why you might choose to migrate and show you how to do it.
read the article: http://msdn.microsoft.com/en-us/magazine/hh148144.aspx
download code: http://archive.msdn.microsoft.com/mag201105ASPNET/Release/ProjectReleases.aspx?ReleaseId=5601
OAuth authentication on website now built-in, question closed

integrating YAF.NET in my MVC3 Razor Solution

I would like to know if there is a way to integrate YAF.NET to my MVC3 Application?
I dont want YAF to be inside my page like using my masterpage or stuff like that, I just want it to be in a subfolder like /forum and if a user clicks the "forum" link he will be redirected to the forum.
In the future I also would like to use a login system for my page, so I have to think about membership provider. I know that there is a way to make YAF use your basic asp.net membership provider but will yaf work with mvc 3 in that way? Since yaf isn't a .NET 4 application I wonder how I could migrate the membership provider?
If there isn't a solution for the membership stuff, I should be able to just link from my page to YAF?
EDIT:
My solution ->
1)I added a subdomain and config both of mine domains to use an A-Record which points to the Server where IIS is running.
2)I added 2 Websites. The first one is my Main Website with my MVC3 Application and the second one is the YAF.NET Forum.
3) I edited the binding settings of both of the websites (IIS Manager -> Sites -> yoursite -> Binding) and removed the IP binding insteed i added a HTTP header. For mainsite = mydomain.com and for the forum forum.mydomain.com
For the first part, you can just install YAF in a virtual directory on your website like www.mywebsite.com/forums/ and let it run standalone there.
Create a new Virtual Directory in the folder you like. (/forums)
Set permissions, .NET settings etc accordingly and install YAF there.
For the second, what you could do is use from your MVC app, directly read YAF's database of users (wherever it is) and use it to authenticate your users.
The Latest build of YAF is on ASP.net 3.5, you could try getting the source and building it for .NET4, although this would not be necessary since you said you don't want to mash your app with it but run it side-by-side and have them interop. (There also is some UserControl feature for CMS's you might want to check that out)
On the features page it says YAF supports asp.net memberships and roles, so you shouldn't have a problem there either.

Resources