Login page fails when loaded inside Microsoft Office add-ins
Our hubspot integration is an Excel add-in. The Excel add-in loads hubspot login page (e.g., https://app.hubspot.com/login/?loginRedirectUrl=https%3A%2F%2Fapp.hubspot.com%2Foauth%2Fauthorize%3F...>) so the user can login hubspot. It has been working very well until a few days ago. The hubspot login page stopped loading inside the Excel add-in.
After debugging, I suspect the cloudflare DDOS prevention page is the culprit. When the above login URL is loaded inside the Excel add-in (User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko), it will return HTTP 503 with HTML page showing messages like "DDoS protection by Cloudflare
Ray ID: 4dadd2d9ef5abcde". That cloudflare page stuck there and thus the actual hubspot login page was not loaded at all.
In comparison, when the same login URL is loaded in Chrome directly, it returns 200 with the right login page HTML markups.
I wonder how does hubspot login page decide whether it will return a cloudflare DDOS prevention page or the actual login page? Do you recommend any solution for the login page to work again inside Excel add-in environment? This is blocking hubspot users to use our integration. Thank you!