@witchcraft/nuxt-auth 0.1.6 → 0.1.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/dist/module.json
CHANGED
|
@@ -36,11 +36,12 @@ export const useAuth = ({ handleActions } = {}) => {
|
|
|
36
36
|
}
|
|
37
37
|
async function logout() {
|
|
38
38
|
setFetchUserOnNavigation();
|
|
39
|
-
|
|
39
|
+
const wasSemiAuthed = isSemiAuthed.value;
|
|
40
40
|
await Promise.allSettled(hooks.beforeLogout.map((listener) => listener()));
|
|
41
41
|
const handled = handleActions?.("logout", getAuthApiRoute(useRuntimeConfig().public, "logout"));
|
|
42
|
+
userData.value = null;
|
|
42
43
|
if (!handled) {
|
|
43
|
-
const res = await $fetch(getAuthApiRoute(useRuntimeConfig().public, "logout"), {
|
|
44
|
+
const res = wasSemiAuthed ? true : await $fetch(getAuthApiRoute(useRuntimeConfig().public, "logout"), {
|
|
44
45
|
cache: "no-store",
|
|
45
46
|
method: "post"
|
|
46
47
|
});
|
|
@@ -79,7 +79,7 @@ export default class GithubProvider implements ProviderHandler<"oauth2", "github
|
|
|
79
79
|
}
|
|
80
80
|
export declare const githubProviderStyle: {
|
|
81
81
|
name: string;
|
|
82
|
-
logo: any
|
|
82
|
+
logo: import("vue").FunctionalComponent<import("vue").SVGAttributes, {}, any, {}>;
|
|
83
83
|
style: {
|
|
84
84
|
bg: string;
|
|
85
85
|
bgDark: string;
|
|
@@ -60,7 +60,7 @@ export default class GoogleProvider implements ProviderHandler<"oauth2_pcke", "g
|
|
|
60
60
|
}
|
|
61
61
|
export declare const googleProviderStyle: {
|
|
62
62
|
name: string;
|
|
63
|
-
logo: any
|
|
63
|
+
logo: import("vue").FunctionalComponent<import("vue").SVGAttributes, {}, any, {}>;
|
|
64
64
|
style: {
|
|
65
65
|
bg: string;
|
|
66
66
|
bgDark: string;
|