mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-12-16 15:20:36 +08:00
update
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
"SidebarStatus": true,
|
||||
"EpThemeColor": "#409EFF",
|
||||
"ShowLogo": true,
|
||||
"ShowModel": "smart",
|
||||
"ShowModel": "chrome",
|
||||
"MenuArrowIconNoTransition": false,
|
||||
"CachingAsyncRoutes": false,
|
||||
"TooltipEffect": "light",
|
||||
|
||||
11
public/silent-renew.html
Normal file
11
public/silent-renew.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
</head>
|
||||
<script type="module" src="./silent-renew.ts"></script>
|
||||
|
||||
<body></body>
|
||||
|
||||
</html>
|
||||
20
public/slient-renew.ts
Normal file
20
public/slient-renew.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { useOidcStore } from "vue3-oidc";
|
||||
|
||||
const { state: oidcState } = useOidcStore();
|
||||
oidcState.value.userManager?.signinSilentCallback();
|
||||
|
||||
const LOGIN_REQUIRED = "login_required";
|
||||
const searchParams = new URLSearchParams(window.location.search);
|
||||
const error = searchParams.get("error");
|
||||
const state = searchParams.get("state");
|
||||
const isLocalService = location.origin.includes(
|
||||
"://localhost" || "0.0.0.0" || "127.0.0.0"
|
||||
);
|
||||
|
||||
console.error(`Error: \n error: ${error} \n state: ${state}`);
|
||||
|
||||
if (error === LOGIN_REQUIRED && import.meta.env && !isLocalService) {
|
||||
localStorage.clear();
|
||||
sessionStorage.clear();
|
||||
top?.location.reload();
|
||||
}
|
||||
Reference in New Issue
Block a user