check cookie redirect sso
This commit is contained in:
parent
c489c78a99
commit
a43279b314
1 changed files with 2 additions and 3 deletions
|
|
@ -22,8 +22,7 @@ import ModulePortfolio from "@/modules/13_portfolio/router";
|
|||
import ModuleDevelop from "@/modules/14_IDP/router";
|
||||
import ModuleProbationReport from "@/modules/15_probationReport/router";
|
||||
|
||||
import { authenticated, tokenParsed } from "@/plugins/auth";
|
||||
import { ro } from "date-fns/locale";
|
||||
import { authenticated, logout } from "@/plugins/auth";
|
||||
// TODO: ใช้หรือไม่?
|
||||
|
||||
const router = createRouter({
|
||||
|
|
@ -96,7 +95,7 @@ router.beforeEach(async (to, from, next) => {
|
|||
if (to.meta.Auth) {
|
||||
const checkAuthen = await authenticated();
|
||||
if (!checkAuthen && to.meta.Auth) {
|
||||
router.push({ name: "loginMain" });
|
||||
logout();
|
||||
}
|
||||
}
|
||||
next();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue