Rocket Chat Integration with AWS Cognito in Iframe

Description

I am using rocket chat cloud offering and trying to set up AWS Cognito OAuth integration with in iframe.

After adding custom oauth in rocket chat dashboard, the custom oauth works in standalone application. However, in the browser, it seems like Cognito has set x-frame-options to deny due to which I am not able to make the aws cognito oauth work in iframe.

The settings added in Custom OAuth option:
URL: https://mydomain.auth.us-east-1.amazoncognito.com

  • Token Path: /oauth2/token
  • Token Sent Via: Header
  • Identity Token Sent Via: Header
  • Identity Path: /oauth2/userInfo
  • Authorize Path: /oauth2/authorize
  • Scope: profile
  • Param Name for access token: access_token
    -id: secret_id
  • secret: secret_key
  • Login style: Redirect

Getting error: Refused to display "cognito_login_url" in a frame because it set 'X-Frame-Options' to 'deny'.