First, to solve this issue, you need to find out what the error is. Set this in your Startup.cs
to reveal the real error (not recommended for a production environment):
if (env.IsDevelopment())
{
IdentityModelEventSource.ShowPII = true;
}
In my case, I had a proxy issue running it locally inside the corporate network.