forked from mirrors/homebox
refactor: rewrite to cookie based auth (#578)
* rewrite to cookie based auth
* remove interceptor
Former-commit-id: 1365bdfd46
This commit is contained in:
parent
36e13ab03b
commit
c71f077466
8 changed files with 155 additions and 71 deletions
|
@ -5,12 +5,17 @@
|
|||
|
||||
definePageMeta({
|
||||
layout: "empty",
|
||||
middleware: [
|
||||
() => {
|
||||
const ctx = useAuthContext();
|
||||
if (ctx.isAuthorized()) {
|
||||
return "/home";
|
||||
}
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const ctx = useAuthContext();
|
||||
if (ctx.isAuthorized()) {
|
||||
navigateTo("/home");
|
||||
}
|
||||
|
||||
const api = usePublicApi();
|
||||
const toast = useNotifier();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue