We implemented a tool which uses salesforce oauth.

This tool should be included into an opportunity page as canvas app.

First of all: The oauth2 workflow works fine when I open the tool in a new browser tab.

We use the KnpUOAuth2ClientBundle ( https://github.com/knpuniversity/oauth2-client-bundle ).

When an authorization is required, the user is redirected to https://foo--bar.lightning.force.com/services/oauth2/authorize?baz

I already tried several configurations (config yaml file) instead of foo--bar.lightning.force.com - e.g. test.salesforce.com .

All of the options I tried redirect to https://foo--bar.cs83.my. salesforce.com/setup/secur/RemoteAccessAuthorizationPage.apexp?baz

This is fine until I try to open the app within a lighning opportunity template.

The canvas app is included in a page which is located here: foo--bar.lightning.force.com

This leads (of course) to security problems and loading of the canvas app content is blocked:

Load denied by X-Frame-Options: https://foo--bar.cs83.my.salesforce.com/setup/secur/RemoteAccessAuthorizationPage.apexp?source=(...)id0:j_id1:canvasapp does not permit framing.

Do anybody know what to do in this case or how to configure the domain of RemoteAccessAuthorizationPage?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.