Not getting Startup.Auth file
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);
}
}
}
Code King
Updated on June 06, 2022Comments
-
Code King about 2 years
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 myStartup.Auth.cs
. What am i doing wrong? The project is started without "Individual User Accounts". -
Code King about 8 yearsWell the problem is that i do not want it to be with Individual User Accounts. Since i do not need 80% of what they are giving me.
-
James P about 8 yearsOk, I understand but you will still need the
Owin Startup & configure
files above - did you try with just adding the two files above? -
James P about 8 yearsAlso see here - stackoverflow.com/questions/19028311/owin-startup-detection - And here asp.net/aspnet/overview/owin-and-katana/…