Source code
Revision control
Copy as Markdown
Other Tools
// receive token from the parent window, set cookie and notify parent
window.addEventListener("message", ({ origin, data }) => {
return;
}
document.cookie = `token=${data}; SameSite=Strict`;
});