Add redirect support for iOS app URL schemes
Currently, when specifying a redirect URL in the form for acquiring Freesound API access credentials, inputting a URL for an iOS app (for example, in the format <appname>://) results in an error, and the message "Enter a valid URL".
Adding support for redirecting to iOS apps would allow developers to handle temporary authorization codes directly, and for the Swift client API (in progress here) to perhaps handle them directly itself, providing a simpler API.

We need to remove a restriction for URL to be a web URL, but still show a warning to catch possible typos in http/https
Hi @philtgun, are you still planning to work on this?
Yes, see this branch. Things left to do is to change the validator to custom one that will accept additional valid URL schemas.
Also that is the thing that I wanted to discuss - which schemas to allow. My proposal is that only non-conventional url schema should be the app name that is provided in other field (case-insensitive).
ok, sorry I did not see this.
Also that is the thing that I wanted to discuss - which schemas to allow. My proposal is that only non-conventional url schema should be the app name that is provided in other field (case-insensitive).
sound good to me
I talked with @philtgun in person - we think that a better idea would be to:
- In the callback url field have a checkbox or other method for the developer to say "I need a non-web callback schema for an app"
- This doesn't check the value against django's url validator
- It also extracts the schema and adds it to a unique list of allowed schemas (new table) which we can validate against in
get_allowed_schemas: https://github.com/MTG/freesound/commit/9c6cd28ec98cb41425a2409f42eb1c624567d395#diff-5175c88a15979be6740553ead5841af9R29 - If someone chooses a duplicate schema, then we don't allow them to do it
FYI, related to this issue, I found out there are two related branches: https://github.com/MTG/freesound/tree/oauth-callback-new-schemas https://github.com/MTG/freesound/tree/oauth-callback-new-schemas-2
Looking at the commits it seems like the second is the most up to date one.