First a big thank you to @leastprivilege for all your amazing work :)
I've inherited a solution that uses Identity Server 4 and is working well. While experimenting with this sample it works fine against localhost, but when trying to connect the Client to Production I'm getting:
'Invalid grant type for client: "authorization_code"'
I've been exploring the issue on StackOverflow:
https://stackoverflow.com/questions/69183994/identity-server4-gives-invalid-grant-error-when-deployed-to-production-but-wo?noredirect=1#comment122318014_69183994
...and the conclusion seems to be that in Production the Client also needs HTTPS. I suppose you have used this sample in Production against an SSL Secured Identity Server 4. Did you have any issues?
When changing the RedirectUri to HTTPS I get:
'HTTPS endpoints can only be configured using KestrelServerOptions.Listen().'
...and am now stuck in various loops trying to work out how to configure Kestrel and get Certificates onto Client machines to integrate into my solution. Just wanting to make sure I'm barking up the right tree and see if there is an easier way :)
Further reading of closed issue #89:
...in this Repo suggests that http loopback should still be fine in Production:
https://tools.ietf.org/html/rfc8252#section-7
...so I'm at loose end where I've gone wrong.