(core) Google auth endpoint has not responded with auth code

Summary:
Google Auth popup wasn't able to resolve origin from gristConfig.
Moving this reponsability to server side, where it gets calculated from initial request.

Test Plan: n/a

Reviewers: dsagal, paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D2935
This commit is contained in:
Jarosław Sadziński
2021-07-21 18:38:57 +02:00
parent 08295a696b
commit 291bcd17ff
5 changed files with 20 additions and 18 deletions

View File

@@ -4,12 +4,9 @@
<meta charset="utf8">
</head>
<body>
<!-- INSERT CONFIG -->
<!-- INSERT MESSAGE -->
<script>
// Determine proper home url for origin parameter
const origin = gristConfig.pathOnly ? gristConfig.homeUrl : `https://${gristConfig.org}${gristConfig.baseDomain}`;
window.opener.postMessage(message, origin);
window.opener.postMessage(message, message.origin);
</script>
</body>
</html>