I cannot find any good documentation on using Microsoft.Owin.Security.OpenIdConnect but I did find a few examples of others Startup.Auth.cs. Note that I am very much a amateur with .net MVC.
I am using: .Net 4.6.1 w/ MVC 5
I started a brand new project in Visual Studio 2017 w/mvc and single user authentication. Installed the appropriate Owin packages. I tested using facebook login with no issues and it worked as expected. But I need to use a custom OpenID provider (OpenAM).
I tried several different Startup.Auth examples all with the same issue. Currently I have it back to the default with the following added:
app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
{
ClientId = "myid",
ClientSecret = "mysecret",
MetadataAddress = "https://authdomain:8443/openam/oauth2/.well-known/openid-configuration",
RedirectUri = "https://localhost:44318/",
ResponseType = "code id_token",
Scope = "openid profile"
});
I also added [Authorize] to the home controller. As expected I am brought to OpenAM's login, I login, asks me if I am ok sharing etc data, click ok and it redirects me back to the redirectUri as expected. But nothing is handling anything as I am simply sent right back to the OpenAm login page.
What configuration is needed to handle the authorization in MVC 5 as it does with facebook, google, etc with a custom OpenID auth? Any good setup guides out there?