I've set up my Commerce Manager Startup.cs and updated the web.config for the Commerce Manager site as described here
In my AD Application definition, I've set the Redirect URI to the same value as the app setting "CommerceManagerLink"
(In the Commerce Manager web.config file, membership and roleManager sections are empty, and authentication has mode="None")
However, when I log in to EPiServer then click the Commerce Manager link or browse directly to the Commerce Manager URI, the Login.aspx page is shown.
Any ideas why I'm not being redirected to Ad to authenticate?
Note that I've set up 2 applications in AD: one for the EPiServer CMS back-end and one for Commerce Manager - is this the correct approach?
I believe we need to tell OWIN to map the login path (/Apps/Shell/Pages/Login.aspx) to redirect or challenge your provider when someone tries to access the site or login page. Here is an example
app.Map(LoginPath, map =>
Microsoft.Owin.Security.IAuthenticationManager owinAuthenticationManager = ctx.Authentication;
// Set the Owin Authentication Challenge
AuthenticationProperties props = new AuthenticationProperties();
props.RedirectUri = "URL to redirect after successful authentication";