zooniverse / panoptes

Zooniverse API to support user defined volunteer research projects
Apache License 2.0
103 stars 41 forks source link

Updating OAuth apps fails with a 422 error #1664

Closed eatyourgreens closed 8 years ago

eatyourgreens commented 8 years ago

Updating the details of an app (redirect_uri in this case) POSTs to https://panoptes.zooniverse.org/oauth/applications/{app_id} which returns 422 Unprocessable Entity

Here's the form data, if it helps (minus the authenticity token)

utf8:✓
_method:put
application[name]:Diagnosis London
application[redirect_uri]:http://localhost:3333/
https://preview.zooniverse.org/wellcome/
application[default_scope][]:user
application[default_scope][]:project
application[default_scope][]:group
application[default_scope][]:collection
application[default_scope][]:classification
application[default_scope][]:subject
application[default_scope][]:medium
commit:Submit
camallen commented 8 years ago

Looks like Doorkeeper requires secure redirects now, https://github.com/doorkeeper-gem/doorkeeper/blob/master/spec/validators/redirect_uri_validator_spec.rb. Will fix manually and look into some better form handling for this.

eatyourgreens commented 8 years ago

Looks like Gorongosa and Shakespeare's World have http: redirects too.

camallen commented 8 years ago

yeah - they were created before this change in the lib we use came in.

eatyourgreens commented 8 years ago

Ok, so we need to upgrade Wildcam and Shakespeare to https, including any content they load, then fix the redirect URIs.

adammcmaster commented 8 years ago

I was planning to do this soon for our custom panoptes projects anyway, so I’ll move that to the top of my list.

On 10 Feb 2016, at 16:59, eatyourgreens notifications@github.com wrote:

Ok, so we need to upgrade Wildcam and Shakespeare to https, including any content they load, then fix the redirect URIs.

— Reply to this email directly or view it on GitHub https://github.com/zooniverse/Panoptes/issues/1664#issuecomment-182479813.