Steam Login in ASP.NET MVC5

I recently played with ASP.NET MVC5 and the new OWIN middleware. I want my users to log in with their Steam account and password. After a successful login, the user only needs the Steam account ID for further processing. Steam can act as an OpenId provider as indicated in the documentation .

In MVC4, one could implement a custom OpenIdClient . It seems to me that in MVC5, the OpenIdClient class is deleted, and authentication is configured using the IAppBuilder class, which offers login methods with Facebook, Google and other predefined providers.

Unfortunately, I could not find the documentation on connecting a custom provider to the new authentication system. Can you give me any instructions or recommendations?

+4
source share
2 answers

This is a response to the generosity that @Buzinas posted.

This solution will use the NuGet Owin Security Providers package, which is available here .

Go to the package manager console ( Tools -> Library Package Manager -> Package Manager Console) and install the above package:

Install-Package Owin.Security.Providers

In your App_Start\Startup.Auth.csadd the correct instruction using. For steam you want

using Owin.Security.Providers.Steam;

Please note that there are several options, so this package is not only for Steam. Owin.Security.Providers

ConfigureAuth app.UseSteamAuthentication("<<API KEY>>");

<<API_KEY>> API, Valve

+15

All Articles