I'm in the process of understanding how to implement OAuth 2.0 native app the right way for Windows. And I've stumbled across this example written in C#. But this is what bugs me about this example:
// Creates a redirect URI using an available port on the loopback address.
string redirectUri = $"http://{IPAddress.Loopback}:{GetRandomUnusedPort()}/";
Everywhere I've read about OAuth 2.0, it's explicitly said that redirect_uri must be pre-registered on OAuth server and can't be dynamic. Is the example wrong or I am missing something?