- From: Pieterjan <notifications@github.com>
- Date: Mon, 26 Jul 2021 00:47:43 -0700
- To: w3c/manifest <manifest@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/manifest/issues/989/886461131@github.com>
Thanks for the reply.

After clicking the "Login using xxx" button, I'm executing the following:
this.authWindow = window.open(`${this.baseUrl}/web/${this.apiVersion}/Account/${this.action}/${medium}/${this.platform}`, '_blank', 'width=600,height=400');
// For example
// this.authWindow = window.open(`https://example.com/web/v3/Account/connect/web/Microsoft`, '_blank', 'width=600,height=400');
Since **https://example.com** is the root of my PWA, you can see that `window.open` is opening my PWA instead of just a new tab. After signing in into the Microsoft/Facebook/... login, a script is executed:
```
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bezig met verwerken...</title>
<script type="text/javascript">
var message = {
status: @( (int)Model.Status ),
medium: "@Model.Medium",
platform: "@Model.Platform",
error: "@Model.Error",
errorDescription: "@Model.ErrorDescription"
};
window.opener.postMessage(JSON.stringify(message), "https://example.com");
</script>
</head>
<body>
</body>
</html>
```
But since this url has been opened in the PWA instead of a browser window, the message doesn't arrive in the opener's window.
> opener -> opens `https://example.com/signin-microsoft` -> PWA is being launched -> Link with opener is broken.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/989#issuecomment-886461131
Received on Monday, 26 July 2021 07:47:55 UTC