NUARIG / competitions

Competitions is a platform to support robust peer review within and across CTSA hubs. This is a cloud-based, single-sign on application for investigators, reviewers and administrators. With Competitions, you can post opportunities, submit applications and review and score those submissions
MIT License
1 stars 1 forks source link

sign-out issue on staging related to turbo that throws a CORS error (Access-Control-Allow-Origin). #964

Closed lmkw closed 2 years ago

lmkw commented 2 years ago

Fix whatever is causing the signout redirect on staging not to work

mattbaumann1 commented 2 years ago

The train of thought here is that these are firing as turbo_streams instead of full html reloads and this means they don't have the necessary information in the headers, which then causes the CORS error.

And because these were link_to instead of button_to, adding turbo = false did not work. It still processed as a turbo_stream. Documentation of it can be found in this issue. https://github.com/hotwired/turbo/issues/119

After fixing this, then we ran into some issues with the removed custom CompetitionsIdpEntityIdReader which needs to be added back.

mattbaumann1 commented 2 years ago

The issue with the CORS error and needing turbo=false can be found discussed on these two blog posts. https://accidentaltechnologist.com/ruby-on-rails/hotwire-fix-for-cors-error-when-using-omniauth/ https://dev.to/rbazinet/hotwire-fix-for-cors-error-when-using-omniauth-3k36