Search code examples
asp.net-mvcopenidsteam

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?


Solution

  • 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.