figma-development-kit
Version:
A set of tools that augment the Figma API
20 lines (17 loc) • 541 B
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>