<!doctype html>

<html lang="en">
<head>
  <meta charset="utf-8">
  <title>authorizing access to Figma APIā€¦</title>
</head>

<body>
  <script>
    const parsedUrl = new URL(window.location.href);
    const code = parsedUrl.searchParams.get('code');
    const state = parsedUrl.searchParams.get('state');
    const figmaAuthorizationCodeData = JSON.stringify({code, state});
    
    window.localStorage.setItem('figma-authorization-code-data', figmaAuthorizationCodeData);
    window.close();
  </script>
</body>
</html>