This commit is contained in:
lingdocs 2021-08-23 12:23:10 +04:00
parent 9b997e86d2
commit 1dcf1bf266
1 changed files with 2 additions and 1 deletions

View File

@ -36,8 +36,9 @@ const Account = ({ user, loadUser }: { user: AT.LingdocsUser | undefined, loadUs
};
// eslint-disable-next-line
}, []);
// TODO put the account url in an imported constant
function handleIncomingMessage(event: MessageEvent<any>) {
if (event.data === "signed in" && popupRef) {
if (event.origin === "https://account.lingdocs.com" && event.data === "signed in" && popupRef) {
loadUser();
popupRef.close();
}