You can use an OAuth 2 redirect URI including a port number, but it will still need to exactly match one of the OAuth 2 redirect URIs that you previously registered, including the port and path. If they don't match exactly, you'll get the error above.
So, first register the exact OAuth 2 redirect URI on the App Console (using the port number, not the string "port") and then use that exact string in the redirect_uri URL parameter.
For example, you're passing "http://127.0.0.1:56207" as the redirect_uri value, so you'll need to register "http://127.0.0.1:56207" exactly on the App Console.
I just tried this and it is working properly for me. If it's not working for you, please share a screenshot of the OAuth 2 redirect URIs registered for your app on the App Console as well as a screenshot of the error page you're getting, including the full URL.