Merge commit 'b337873ca214682487844973104772539956c09a' into feature/48-usergroup-management
ref #48
This commit is contained in:
commit
266a11f64f
@ -27,6 +27,12 @@
|
|||||||
storeName: "lfk_admin",
|
storeName: "lfk_admin",
|
||||||
description: "LfK! admin dashbaord",
|
description: "LfK! admin dashbaord",
|
||||||
});
|
});
|
||||||
|
window.onunhandledrejection = event => {
|
||||||
|
if(event.reason.toString() == "Error: Unauthorized"){
|
||||||
|
console.log("Found 1")
|
||||||
|
localForage.clear();
|
||||||
|
location.replace("/");
|
||||||
|
}};
|
||||||
//
|
//
|
||||||
import Login from "./components/auth/Login.svelte";
|
import Login from "./components/auth/Login.svelte";
|
||||||
import Dashboard from "./components/dashboard/Dashboard.svelte";
|
import Dashboard from "./components/dashboard/Dashboard.svelte";
|
||||||
|
@ -28,7 +28,7 @@ const store = () => {
|
|||||||
const jwtinfo = JSON.parse(atob(auth.access_token.split('.')[1]));
|
const jwtinfo = JSON.parse(atob(auth.access_token.split('.')[1]));
|
||||||
state.jwtinfo = jwtinfo;
|
state.jwtinfo = jwtinfo;
|
||||||
localForage.setItem('logindata', auth);
|
localForage.setItem('logindata', auth);
|
||||||
});
|
}).catch(this.logout());
|
||||||
},
|
},
|
||||||
login(auth, jwtinfo) {
|
login(auth, jwtinfo) {
|
||||||
update((state) => {
|
update((state) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user