mit-teaching-systems-lab / discourse-edx-lti

Discourse plugin for using Discourse as a discussion forum in EdX courses
http://tsl.mit.edu
MIT License
22 stars 6 forks source link

Custom redirect url not working since Discourse 2.4.0 #34

Closed brospars closed 3 years ago

brospars commented 4 years ago

Hi, Since Discourse updated to v2.4.0, the custom url parameter to redirect users after login doesn't seems to work anymore.

Here's the POST request parameters :

resource_link_id=e09c86b8406648b2bc87dc611ff7e8f1
lis_person_contact_email_primary=mymail@yopmail.com
user_id=88c71f99e4a0e0474b5b130359f680ea
roles=Instructor
oauth_nonce=40036430943264592951584955216
oauth_timestamp=1584955216
lis_result_sourcedid=course-b2bc87dc611ff7e8f1:88c71f99e4a0e0474b5b130359f680ea
context_id=course-v1
oauth_consumer_key=6f045120e1d051a592233ae4f6018ae2a5b81e650ba2d037e693e8b3f4c2aa
lti_version=LTI-1p0
oauth_signature_method=HMAC-SHA1
custom_url=https://my-forum.com/mooc/c/module-1-category
oauth_version=1.0
launch_presentation_return_url
oauth_signature=lLUu3C9m3KTIj/AGeRddKkZdys8=
lis_person_sourcedid=brospars
lti_message_type=basic-lti-launch-request
oauth_callback=about:blank

The response is a 302 and contains location=https://my-forum.com/ instead of the expected location=https://my-forum.com/mooc/c/module-1-category

I downgraded to v2.3.0 and everything works as expected. I've searched in the changelog but no luck. Any ideas ?

kevinrobinson commented 4 years ago

@brospars Thanks for reaching out! I don't know more about this and personally haven't done any work with updating to newer Discourse versions, so probably can't help a whole lot but am happy to try to help.

One place to start might be checking out the plugin code for set_origin_url! in lti_strategy.rb and see if anything in there provides a good lead of what might be going on, or where to look in Discourse about what's changed in v2.4.0.

brospars commented 4 years ago

Yes I started looking for something related to destination_url but with no luck yet. I'll keep you posted.

kevinrobinson commented 4 years ago

Awesome! 👍 I can't put in much time to really help out, but am happy to try to brainstorm if you get stuck, or take a look at what you figure out!

brospars commented 3 years ago

Sorry for the long delay but seems to be working again., so closing.