TF-624 Implement logout oidc on browser

This commit is contained in:
dab246
2022-06-07 20:53:09 +07:00
committed by Dat H. Pham
parent dcaa340fa1
commit 9c9e12dedc
13 changed files with 86 additions and 72 deletions
+25
View File
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<script>
const AUTH_RESPONSE_KEY = "auth_info";
const CODE_VERIFIER_KEY = "auth_code_verifier";
window.onload = function () {
localStorage.removeItem(AUTH_RESPONSE_KEY);
localStorage.removeItem(CODE_VERIFIER_KEY);
const params = new URLSearchParams(window.location.search)
if (params.has('redirect_uri')) {
const redirect = params.get('redirect_uri');
window.location.replace(redirect);
} else {
window.location.assign("/");
}
}
</script>
</head>
<body>
</body>
</html>