I'm having some problems with out of the box Microsoft Authentication with a plain MVC 5 site.
I have set up my hosts file to route 127.0.0.1 to www.mysite.com.
I have configured the redirect url for the App on windows live to goto www.mysite.com/signin-microsoft
In Visual Studio 2015 I've set the properties for the website to use Local IIS and www.mysite.com
When I try to authenticate through Microsoft, it shows the Live login screen, when I enter my details it redirects back to the account controller endpoint ExternalLoginCallback(string returnUrl) but - returnUrl is null and the next line where it tries to get loginInfo always returns null.
Auth is set up in Startup.Auth as
var options = new MicrosoftAccountAuthenticationOptions
{
ClientId = "<redacted>",
ClientSecret = "<redacted>",
CallbackPath = new PathString("/signin-microsoft")
};
options.Scope.Add(scope);
app.UseMicrosoftAccountAuthentication(options);
I hit this url in fiddler - "Account/ExternalLoginCallback?error=access_denied"
I've followed the answer in this post - ASP.NET MVC Microsoft Live Account Authentication on Localhost
I can't work out what I'm missing.
Any help would be greatly appreciated.
Thanks