I'm trying to embed an Open search dashboard in an iframe inside a react application. The iframe code is provided by Open Search:
<iframe
title="Dashboard"
src="https://app-name.us-east-1.es.amazonaws.com/_dashboards/app/dashboards?security_tenant=READ_ONLY#/view/app-id?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(description:'',filters:!(),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!f,title:test_abm,viewMode:view)"
></iframe>
but I'm getting the following error:
Refused to display 'https://app_name.auth.us-east-1.amazoncognito.com/' in a frame because it set 'X-Frame-Options' to 'deny'.
I think cognito is blocking the conection because it doesn't detect that I'm logged in.
Is there a way to pass my auth token to the iframe so it will display the dashboard?