forked from mirrors/homebox
feat: auth-roles, image-gallery, click-to-open (#166)
* schema changes * db generate * db migration * add role based middleware * implement attachment token access * generate docs * implement role based auth * replace attachment specific tokens with gen token * run linter * cleanup temporary token implementation
This commit is contained in:
parent
974d6914a2
commit
de419dc37d
48 changed files with 3127 additions and 244 deletions
|
@ -6,6 +6,7 @@ import { UserOut } from "~~/lib/api/types/data-contracts";
|
|||
export const useAuthStore = defineStore("auth", {
|
||||
state: () => ({
|
||||
token: useLocalStorage("pinia/auth/token", ""),
|
||||
attachmentToken: useLocalStorage("pinia/auth/attachmentToken", ""),
|
||||
expires: useLocalStorage("pinia/auth/expires", ""),
|
||||
self: null as UserOut | null,
|
||||
}),
|
||||
|
@ -27,6 +28,7 @@ export const useAuthStore = defineStore("auth", {
|
|||
const result = await api.user.logout();
|
||||
|
||||
this.token = "";
|
||||
this.attachmentToken = "";
|
||||
this.expires = "";
|
||||
this.self = null;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue