@open-xamu-co/firebase-nuxt 2.0.0-next.6 → 2.0.0-next.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
Firebase nuxt
|
|
2
2
|
|
|
3
|
+
# [2.0.0-next.7](https://github.com/xamu-co/firebase-nuxt/compare/v2.0.0-next.6...v2.0.0-next.7) (2026-01-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* configurable default on session store actions ([117ce2e](https://github.com/xamu-co/firebase-nuxt/commit/117ce2e206563f4aa14eba7d427c9432cbfb7705))
|
|
9
|
+
|
|
3
10
|
# [2.0.0-next.6](https://github.com/xamu-co/firebase-nuxt/compare/v2.0.0-next.5...v2.0.0-next.6) (2026-01-20)
|
|
4
11
|
|
|
5
12
|
|
package/dist/module.json
CHANGED
|
@@ -15,7 +15,7 @@ export declare const useSessionStore: import("pinia").StoreDefinition<"session",
|
|
|
15
15
|
path: import("vue").ComputedRef<string>;
|
|
16
16
|
setUser: ({ createdAt, updatedAt, ...userData }: User, token: string) => void;
|
|
17
17
|
unsetSession: (expiredToken?: boolean) => void;
|
|
18
|
-
logout: (clientAuth?: Auth) => Promise<void>;
|
|
18
|
+
logout: (clientAuth?: Auth, unsetSessionFn?: (expiredToken?: boolean) => void) => Promise<void>;
|
|
19
19
|
remove: (clientAuth?: Auth) => Promise<void>;
|
|
20
20
|
}, "user" | "token" | "expiredToken">, Pick<{
|
|
21
21
|
token: import("#app").CookieRef<string | null>;
|
|
@@ -24,7 +24,7 @@ export declare const useSessionStore: import("pinia").StoreDefinition<"session",
|
|
|
24
24
|
path: import("vue").ComputedRef<string>;
|
|
25
25
|
setUser: ({ createdAt, updatedAt, ...userData }: User, token: string) => void;
|
|
26
26
|
unsetSession: (expiredToken?: boolean) => void;
|
|
27
|
-
logout: (clientAuth?: Auth) => Promise<void>;
|
|
27
|
+
logout: (clientAuth?: Auth, unsetSessionFn?: (expiredToken?: boolean) => void) => Promise<void>;
|
|
28
28
|
remove: (clientAuth?: Auth) => Promise<void>;
|
|
29
29
|
}, "path">, Pick<{
|
|
30
30
|
token: import("#app").CookieRef<string | null>;
|
|
@@ -33,6 +33,6 @@ export declare const useSessionStore: import("pinia").StoreDefinition<"session",
|
|
|
33
33
|
path: import("vue").ComputedRef<string>;
|
|
34
34
|
setUser: ({ createdAt, updatedAt, ...userData }: User, token: string) => void;
|
|
35
35
|
unsetSession: (expiredToken?: boolean) => void;
|
|
36
|
-
logout: (clientAuth?: Auth) => Promise<void>;
|
|
36
|
+
logout: (clientAuth?: Auth, unsetSessionFn?: (expiredToken?: boolean) => void) => Promise<void>;
|
|
37
37
|
remove: (clientAuth?: Auth) => Promise<void>;
|
|
38
38
|
}, "remove" | "setUser" | "unsetSession" | "logout">>;
|
|
@@ -40,7 +40,7 @@ export const useSessionStore = defineStore("session", () => {
|
|
|
40
40
|
setToken("", expiredToken2);
|
|
41
41
|
user.value = void 0;
|
|
42
42
|
}
|
|
43
|
-
async function logout(clientAuth) {
|
|
43
|
+
async function logout(clientAuth, unsetSessionFn = unsetSession) {
|
|
44
44
|
if (import.meta.server) return;
|
|
45
45
|
const Swal = useSwal();
|
|
46
46
|
const { value } = await Swal.firePrevent({
|
|
@@ -48,7 +48,7 @@ export const useSessionStore = defineStore("session", () => {
|
|
|
48
48
|
text: "\xBFEsta seguro de querer cerrar sesion?"
|
|
49
49
|
});
|
|
50
50
|
if (value) {
|
|
51
|
-
|
|
51
|
+
unsetSessionFn();
|
|
52
52
|
await clientAuth?.signOut();
|
|
53
53
|
window.location.href = "/";
|
|
54
54
|
}
|