IFrame Portlet Basic Authentication to a subdomain different website

Jamie Sammons, modified 3 Years ago. New Member Posts: 5 Join Date: 5/13/21 Recent Posts

Hi all,

I'm trying to use IFrame Portlet Basic Authentication to auto-login in a subdomain different website (example.liferay-website.com) and from what I can see, the Fetch API is not adding the Authorization header to the request, which is probably because the "authorization" header is not CORS-safelisted [1]

Liferay is using Fetch API no-cors mode [2] which checks if the headers are CORS-safelisted.

So I'm wondering if what i'm trying to accomplish is possible and how.

Best regards,

[1] https://stackoverflow.com/questions/44606244/using-fetch-api-with-mode-no-cors-can-t-set-request-headers

[2] : https://github.com/liferay/liferay-portal/blob/ad3ddfdd30a5364c28d44d96c86e2d5bb3628093/modules/apps/iframe/iframe-web/src/main/resources/META-INF/resources/view.jsp#L175