Eneko Nieto committed 2021-01-18 01:10:30 +01:00
1 parent 63dabe3357
commit 83be283757
43 files changed
+1469 -551

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
<html>
<body>
<script>
var checks = [
/[\?|&|#]code=/,
/[\?|&|#]error=/,
/[\?|&|#]token=/,
/[\?|&|#]id_token=/
];
function isResponse(str) {
var count = 0;
if (!str) return false;
for (var i = 0; i < checks.length; i++) {
if (str.match(checks[i])) return true;
}
return false;
}
var message = isResponse(location.hash)
? location.hash
: '#' + location.search;
(window.opener || window.parent).postMessage(message, location.origin);
</script>
</body>
</html>