Files

29 lines
928 B
HTML
Raw Permalink Normal View History

<!doctype html>
<!--
OAuth redirect target for Facebook Login for Business (Messenger/Instagram).
Meta redirects the login popup here with ?code&state; this relays them to the
opener and closes. It's a static file (not the SPA) so the popup stays light,
and it must be registered as a Valid OAuth Redirect URI on the Meta app.
-->
<html>
<head><meta charset="utf-8" /><title>Connecting…</title></head>
<body>
Connecting…
<script>
(function () {
var params = new URLSearchParams(window.location.search)
var message = {
source: 'meta-oauth',
code: params.get('code'),
state: params.get('state'),
error: params.get('error_description') || params.get('error'),
}
if (window.opener) {
window.opener.postMessage(message, window.location.origin)
}
window.close()
})()
</script>
</body>
</html>