I am trying to install steam login, for my website, BUT after i have done the installation in nuget package manager console, with the following install code: Install-Package Owin.Security.Providers.Steam I am missing my Startup.Auth.cs. What am i doing wrong?
The project is started without "Individual User Accounts".
The Startup.Auth.cs file should be in your App_Start Folder. Just create a default MVC web application with Individual User Accounts selected as the Authentication type under Change Authentication option to see how its implemented.
For reference:
using Microsoft.Owin;
using Microsoft.Owin.Security.Cookies;
using Owin;
using Owin.Security.Providers.Steam;
namespace WebApplication
{
public partial class Startup
{
public void ConfigureAuth(IAppBuilder app)
{
//other Config
app.UseSteamAuthentication("your API key");
}
}
}
See here for reference on how to add the Steam login button.
Edit: Also see here for Adding MVC 5 Identity to our Existing Project.
You may need to add startup.cs to root of your project:
using Microsoft.Owin;
using Owin;
[assembly: OwinStartupAttribute(typeof(WebApplication1.Startup))]
namespace WebApplication1
{
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app);
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With