I build Canvas app based on MEAN stack and store on Heroku. I want get access to userInfo and use it for connection and queries to database. I have created app into salesforce.com dev account with clientId, clientSecret and then I have used them for user login via OAuth2. I try to use this wrapper for interaction with salesforce.com. I read canvas dev's guide but didn't understand how to make authorization of the user by OAuth2.

The order of actions which I try:

  1. When app starting server make redirect to https


  1. Then I click on "Allow" button and app gets access token and other info.

  2. And then I can make SOQL queries.

But when I try to run my app I have

"Refused to display 'eu5.salesforce.com/setup/secur/RemoteAccessAuthorizationPage.apexp?…&sdtd=1#target_origin=https%3A%2F%2Feu5.salesforce.com&instance_id=_:test2:' in a frame because it set 'X-Frame-Options' to 'DENY'."

It occurs after redirect from my app to salesforce.com auth page via getAuthorizationUrl method.

Could you explain me please, where I was wrong?

1 Answer 1


Salesforce doesn't permit it's login screen to be contained in an IFRAME (that's what the error means. You gotta do a popup (which can be problematic), or you cannot do a login there

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .