Skip to Content

Error in getting access token redirect url oAuth cross domain error

Dec 19, 2016 at 04:22 PM


avatar image

Hi, when we call try to get the access token using oAuth we ar being redirected to jam landing page inside the gadget.

when i open console i see the error. we have added cross domain setting in our application.

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('') does not match the recipient window's origin ('').

10 |10000 characters needed characters left characters exceeded

If i open the application in new window it works and i get the access token.


However if i do the same in gadget itself. i am redirected to the jam landing page and not the redirect url. image attached.

error.png (64.1 kB)
error2.png (68.3 kB)
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Adam Stone
Jan 05, 2017 at 05:58 PM

It looks like you are trying to modify one of our tutorials to expand its functionality and are running into a cross origin issue as SAP Jam and the SuccessFactors login page are not on the same server. It also appears that you are trying to do authentication using three legged OAuth. I'm not sure how easy this would be, or why you would not just take advantage of the opensocial api's that will already have you authenticated. You will need to provide more details on what you are trying to modify and what your attempted workflow is for us to assist further on this.

Show 3 Share
10 |10000 characters needed characters left characters exceeded

HI Adam thanks for your answer. I do not how how to get access token 1.0a from the iframe to call the oData apis, we are able to get the token using php oAuth client oAuth 1.0a and it redirects to allow or deny page. the same thing does not work in the iframe and we get redirected to the landing page. we have already written part of the code for authorize user by getting Auth 1.0a token, and then call the other APIs. We now need to function in the opensocial gadget and want it to be a seamless experience. How does user authorize an external application inside an ifame for oAuth 1.0a token.


I would highly suggest reading the documentation around


gadgetexample.txt HI Adam,

I implemented and it gives me You have disallowed this request. error.png I get the same error when implementing oAuth 2.0 using php client. So i do not have the oAuth 2 access token.

error.png (58.4 kB)