Currently I'm working on migrating my app from the OAuth2 token-flow to the code-flow with refresh tokens (as will be required in future by Dropbox). Now I'm facing the problem that custom url schemes like "com.example.appname" are not accepted as redirect urls of the code flow, and therefore opening the authorization page shows the 400 error message:
Invalid redirect_uri. When response_type=code, redirect_uri must start with "https://", unless it's a localhost URI.
The problem is, that Windows apps are not allowed to listen for https/localhost redirects, unless they where started with elevated admin privileges (which I want to avoid of course). UWP apps can register custom url schemes though, as is also common on other platforms like Android.
So my question, will Dropbox allow custom url schemes before the short lived tokens become mandatory, or how should we solve this dilemma?
P.S. My code-flow already works for other services like GoogleDrive or OneDrive and I'm aware of the solution with localhost plus port number, but free ports must be determined dynamically, they cannot be choosen fix, so we cannot register them in the developer console.