Not getting Startup.Auth file

16,482

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);
        }
    }
}
Share:
16,482
Code King
Author by

Code King

Updated on June 06, 2022

Comments

  • Code King
    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 my Startup.Auth.cs. What am i doing wrong? The project is started without "Individual User Accounts".

  • Code King
    Code King about 8 years
    Well 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
    James P about 8 years
    Ok, 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
    James P about 8 years