2

There is a web application that has SSO for Salesforce, this is implemented using keycloak OIDC.

The web application has a login page provided which has Sign-in with Salesforce option.

This web application URL is framed in Salesforce. The iframe is not blocked and the login page is displayed without any issues. But when login with Salesforce is clicked, it redirects to the Salesforce login page. This is where it throws an error that refused to connect to *.my.salesforce.com.

Note:

  1. This only happens when a user tries to log in using SSO from the iframe.
  2. This only happens when the user tries to log in the first time, post that even iframe sso login works

Tried salesforce settings like:

  1. Trusted CSP
  2. Session Settings -> trusted domain and clickjacking.
Sujith Kumar
  • 872
  • 6
  • 19

1 Answers1

0

Login pages typically shouldn't be framed for security reasons. If the login page restricts framing page by X-Frame-Options or Content Security Policy frame-ancestors directive there is nothing you can set on your end to make it work. The only options would be to allowlist your site by Salesforce login page for framing (if they support this) or route requests through a proxy that removes the framing (absolutely not recommended).

Halvor Sakshaug
  • 2,583
  • 1
  • 6
  • 9