The Discourse code in omniauth_callbacks_controller#complete checks for the origin, but if a :destination_url cookie is set, it will use that instead. Here we set that cookie directly to ensure that after successful LTI authentication we redirect to the page the course author intended.
The Discourse code in omniauth_callbacks_controller#complete checks for the origin, but if a
:destination_url
cookie is set, it will use that instead. Here we set that cookie directly to ensure that after successful LTI authentication we redirect to the page the course author intended.