Skip to main content
Question

How to get origin !== null in iFrame


Jan_Jankowski

I am trying to follow the guide OAuth with Plugins | Plugin API but I got stuck on point 3.

  1. This plugin iframe redirects to a hostname under your control, for example a page hosted on your internet server. This will place the iframe on a non-null origin, which enables us to securely check its identity later in the flow.

After opening an iFrame for authorization the origin is still null.

    figma.showUI(
      `<script>
        window.location.href = "https://myAuthProvider";
        console.log(window.origin); //null
      </script>`,
      { height: 600, width: 400 }
    );
This topic has been closed for replies.

2 replies

Have you managed to solve this problem? I am also getting same error


Vitaly_Gachkovsky

Same problem:(


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings