'WordPress profile page is not accessed after user logs in from iframe embedded in other domain

I have created a particular user role that is redirected to his/her profile page when logging in. This seems to work fine when the user logs in from the website login but is not working when doing so from an iframe embedded in a chatbot. See image

Having checked the browser search console as suggested below, I found the following: Refused to display 'https://staging.xxx.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

I understand that this is a security implementation and I would therefore like to allow only the chatbot's domain to access the profile page. Any ideas on how I could achieve this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source