Suppression du fichier silent-refresh.html

develop
jboinembalome 4 years ago
parent 485d5f111d
commit 198d440f97
  1. 3
      angular.json
  2. 31
      src/silent-refresh.html

@ -21,8 +21,7 @@
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets",
"src/silent-refresh.html"
"src/assets"
],
"styles": [
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",

@ -1,31 +0,0 @@
<html>
<body>
<script>
// Based on: https://manfredsteyer.github.io/angular-oauth2-oidc/docs/additional-documentation/silent-refresh.html
const checks = [/[\?|&|#]code=/, /[\?|&|#]error=/, /[\?|&|#]token=/, /[\?|&|#]id_token=/];
function isResponse(str) {
let count = 0;
if (!str) {
return false;
}
for (let i = 0; i < checks.length; i++) {
if (str.match(checks[i])) return true;
}
return false;
}
let message = isResponse(location.hash) ? location.hash : '#' + location.search;
//console.log("Rafraîchissement silencieux de l'iframe affichée dans l'application parente, message: ", message);
(window.opener || window.parent).postMessage(message, location.origin);
</script>
</body>
</html>
Loading…
Cancel
Save