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

Lms IFrame rendering error "Load denied by X-Frame-Options: ... does not permit cross-origin framing." #20

Closed zimka closed 6 years ago

zimka commented 6 years ago

Hello! I tried to set up discourse as edx forum and faced next problem: while oauth goes well and right page is returned from discourse in response, it is not rendered in lms with error "Load denied by X-Frame-Options: ... does not permit cross-origin framing."

As I see in edx course, Discourse is not intended to be rendered into IFrame, moreover, it is not supported by Discourse itself.

Could this error be due the wrong version lti-consumer? I use eucalyptus.1 edx instance with 1.0.9 lti-consumer. Could you specify which edx release and lti-consumer are required/ were tested?

kevinrobinson commented 6 years ago

Hello @zimka, thanks for opening this issue, and for the helpful background links too!

In our courses, we've launched the LTI integration in a new tab, not inline within EdX. The intention there was mostly around user experience (i.e., so it's clear it's a separate UI and so the Discourse UI has more screen space). We've used this on both edx.org courses and on edge.edx.org, but never on self-hosted instances. Looks like we left this out in the readme section for "course author setup" and I'll add it in. That should get things working for you!

If you're set on embedding within an iframe I don't have any better ideas other than forking Discourse as suggested on the meta thread. You could ask there about doing that in a way that made it a site setting, or was easily configurable, and see if they'd be open to merging it back it.

kevinrobinson commented 6 years ago

Updated this in the readme in https://github.com/mit-teaching-systems-lab/discourse-edx-lti/pull/21. Thanks again @zimka!

zimka commented 6 years ago

@kevinrobinson thanks, you're right, "New window" option solved the problem.