We are hosting Discourse in an iframe, so google oAuth doesn’t really work because they have x-frame options to prevent loading it.
What we’d like to do is use window.open and have the “small” oauth url for fb and google open up, and then upon closing redirect window.opener properly. Is this possible with Discourse settings? Or where is the code to do the location redirect, so we could change it?
I don’t believe this is officially supported. Discourse is a Single Page Application and there are no guarantees when it comes to running within an iframe.
Yup! So really my main question is — where is the code that is triggered when someone clicks Connect with Facebook or Google? How can I override it? Maybe in the site theme JS, so I don’t have to develop a plugin?
All I want to do is replace window.location.href = … with window.open()