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:
- This only happens when a user tries to log in using SSO from the iframe.
- This only happens when the user tries to log in the first time, post that even iframe sso login works
Tried salesforce settings like:
- Trusted CSP
- Session Settings -> trusted domain and clickjacking.