From 1dcf1bf266d9ed39253a6ccb60b79ec373f01a87 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Mon, 23 Aug 2021 12:23:10 +0400 Subject: [PATCH] m --- website/src/screens/Account.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/src/screens/Account.tsx b/website/src/screens/Account.tsx index e527042..f1c37e7 100644 --- a/website/src/screens/Account.tsx +++ b/website/src/screens/Account.tsx @@ -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) { - if (event.data === "signed in" && popupRef) { + if (event.origin === "https://account.lingdocs.com" && event.data === "signed in" && popupRef) { loadUser(); popupRef.close(); }