2

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

login.salesforce.com/services/oauth2/authorize?response_type=code&client_id=3MVG9Rd3qC6oMalU9pyYpi9ShJ7tvqQJ9z8dR1BUIo0Z2Kgtn2HOlsfimKR3P4eOswLv7LJdQm8WIKSvqt0mp&redirect_uri=https%3A%2F%2Flocalhost%3A8081%2Foauth2%2Fcallback&scope=full

  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

0

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 .