<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z00008Oh4CWCAZOkta Classic EngineSingle Sign-OnAnswered2025-08-23T09:00:27.000Z2022-11-22T15:21:49.000Z2022-11-25T12:11:22.000Z

2s1eh (2s1eh) asked a question.

issue with okta_post_message responce mode giving error

Hello,

 

we are seeing issue with okta_post_message response mode . the URL works fine with query.

 

Below is the URL we are trying on browser and it get struck on the browser not going anywhere.

https://abc.com/oauth2/v1/authorize?client_id=XXXXXXXXcode_challenge=V-HHH-gYyfW0D_KlHs11Jp8I50Gg2Oc-ZRPPhiuJKhc&code_challenge_method=S256&nonce=SM97kDTYgx6iseSzqirXgcBo0nLXsGvUVWUy4klxban0l8galyb5Da3ZhiCJxjCc&prompt=none&redirect_uri=https://xyz.com&response_mode=okta_post_message&response_type=code&state=1sgy4hDgcB6Bl6rOhDvsbMDpF3Dgqw3BBS2uh2KGA86oMs3vDMwLM6TTeeBLcFs6&scope=openid profile

 

Below is the error showing in developer tool.

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

Did any one faced similar. Please let me know why it's not working with okta_post_message .

 

 


  • flaviu.vrinceanu1.5628408972654734E12 (Customer Success Service Delivery)

    Hi @2s1eh (2s1eh)​,

     

    Thank you for posting on the Okta community page!

     

    I have done some research and managed to find that this error might be caused if the domain in the redirectUri does not match the domain hosting the sign in widget, as per the mention in the below article for the okta_post_message parameter, where it is stated that this value provides a secure way for a single-page application to perform a sign-in flow in a pop-up window or an iFrame and receive the ID token, access token, and/or authorization code back in the parent page without leaving the context of that page

     

    Additionally, my advice would be to leverage the Okta Developer forums for this type of questions and take advantage of their expertise.

     

    ------------------------------------------------------------------------------------------------------------------------------------------------

    The Okta Community November newsletter is here. Get product updates and see our top contributing members.

    Expand Post
  • 2s1eh (2s1eh)

    Hi Flaviu,

     

    Thank you for your response.

    We are using custom domain for our org. Both re-direct url and custom url are in same domain.

    as suggested ,I have also posted issue in developer forum.

     

    Thanks,

    Uday

    Expand Post
This question is closed.
Loading
issue with okta_post_message responce mode giving error