mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-02 15:50:27 +00:00
Merge branch 'hay-kot:main' into main
This commit is contained in:
commit
f116683e4c
2 changed files with 10 additions and 3 deletions
|
@ -114,6 +114,16 @@ class AuthContext implements IAuthContext {
|
|||
const r = await api.login(email, password, stayLoggedIn);
|
||||
|
||||
if (!r.error) {
|
||||
const expiresAt = new Date(r.data.expiresAt);
|
||||
this._token = useCookie(AuthContext.cookieTokenKey, {
|
||||
expires: expiresAt,
|
||||
});
|
||||
this._expiresAt = useCookie(AuthContext.cookieExpiresAtKey, {
|
||||
expires: expiresAt,
|
||||
});
|
||||
this._attachmentToken = useCookie(AuthContext.cookieAttachmentTokenKey, {
|
||||
expires: expiresAt,
|
||||
});
|
||||
this._token.value = r.data.token;
|
||||
this._expiresAt.value = r.data.expiresAt as string;
|
||||
this._attachmentToken.value = r.data.attachmentToken;
|
||||
|
|
3
frontend/pnpm-lock.yaml
generated
3
frontend/pnpm-lock.yaml
generated
|
@ -103,9 +103,6 @@ devDependencies:
|
|||
eslint-plugin-vue:
|
||||
specifier: ^9.4.0
|
||||
version: 9.8.0(eslint@8.29.0)
|
||||
h3:
|
||||
specifier: ^1.7.1
|
||||
version: 1.7.1
|
||||
isomorphic-fetch:
|
||||
specifier: ^3.0.0
|
||||
version: 3.0.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue