@floatingpixels/supabase-nuxt 0.4.15 → 0.5.0
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
|
@@ -1 +1,4 @@
|
|
|
1
|
-
export declare const useSupabaseUser: () => Promise<
|
|
1
|
+
export declare const useSupabaseUser: () => Promise<{
|
|
2
|
+
data: import("@supabase/supabase-js").JwtPayload | undefined;
|
|
3
|
+
error: import("@supabase/supabase-js").AuthError | null;
|
|
4
|
+
}>;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { useSupabaseClient } from "./useSupabaseClient.js";
|
|
2
2
|
export const useSupabaseUser = async () => {
|
|
3
3
|
const supabase = useSupabaseClient();
|
|
4
|
-
const {
|
|
5
|
-
|
|
6
|
-
} = await supabase.auth.getUser();
|
|
7
|
-
return user;
|
|
4
|
+
const { data, error } = await supabase.auth.getClaims();
|
|
5
|
+
return { data: data?.claims, error };
|
|
8
6
|
};
|
|
@@ -12,8 +12,8 @@ export default defineNuxtPlugin({
|
|
|
12
12
|
(path) => new RegExp(`^${path.replace(/\*/g, ".*")}$`).test(to.path)
|
|
13
13
|
);
|
|
14
14
|
if (isExcluded) return;
|
|
15
|
-
const user = await useSupabaseUser();
|
|
16
|
-
if (!user) {
|
|
15
|
+
const { data: user, error } = await useSupabaseUser();
|
|
16
|
+
if (error || !user) {
|
|
17
17
|
return navigateTo("/login", { redirectCode: 302 });
|
|
18
18
|
}
|
|
19
19
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floatingpixels/supabase-nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Supabase module for Nuxt",
|
|
5
5
|
"repository": "floatingpixels/supabase-nuxt",
|
|
6
6
|
"license": "MIT",
|
|
@@ -59,36 +59,36 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@supabase/ssr": "^0.6.1",
|
|
62
|
-
"@supabase/supabase-js": "^2.
|
|
62
|
+
"@supabase/supabase-js": "^2.54.0",
|
|
63
63
|
"cookie": "^1.0.2"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@nuxt/devtools": "^2.6.
|
|
67
|
-
"@nuxt/eslint-config": "^1.
|
|
68
|
-
"@nuxt/kit": "^
|
|
69
|
-
"@nuxt/module-builder": "^1.0.
|
|
70
|
-
"@nuxt/schema": "^
|
|
71
|
-
"@nuxt/test-utils": "3.19.
|
|
72
|
-
"@playwright/test": "^1.
|
|
66
|
+
"@nuxt/devtools": "^2.6.2",
|
|
67
|
+
"@nuxt/eslint-config": "^1.8.0",
|
|
68
|
+
"@nuxt/kit": "^4.0.3",
|
|
69
|
+
"@nuxt/module-builder": "^1.0.2",
|
|
70
|
+
"@nuxt/schema": "^4.0.3",
|
|
71
|
+
"@nuxt/test-utils": "3.19.2",
|
|
72
|
+
"@playwright/test": "^1.54.2",
|
|
73
73
|
"@snaplet/copycat": "^6.0.0",
|
|
74
74
|
"@snaplet/seed": "^0.98.0",
|
|
75
75
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
76
|
-
"@types/node": "^24.
|
|
76
|
+
"@types/node": "^24.2.1",
|
|
77
77
|
"@vitest/coverage-v8": "3.2.4",
|
|
78
78
|
"@vue/test-utils": "^2.4.6",
|
|
79
|
-
"changelogen": "^0.6.
|
|
80
|
-
"eslint": "^9.
|
|
81
|
-
"eslint-config-prettier": "^10.1.
|
|
79
|
+
"changelogen": "^0.6.2",
|
|
80
|
+
"eslint": "^9.33.0",
|
|
81
|
+
"eslint-config-prettier": "^10.1.8",
|
|
82
82
|
"happy-dom": "^18.0.1",
|
|
83
|
-
"nuxt": "^
|
|
84
|
-
"playwright-core": "^1.
|
|
83
|
+
"nuxt": "^4.0.3",
|
|
84
|
+
"playwright-core": "^1.54.2",
|
|
85
85
|
"postgres": "^3.4.7",
|
|
86
86
|
"prettier": "^3.6.2",
|
|
87
|
-
"release-it": "^19.0.
|
|
88
|
-
"supabase": "^2.
|
|
89
|
-
"typescript": "5.
|
|
87
|
+
"release-it": "^19.0.4",
|
|
88
|
+
"supabase": "^2.33.9",
|
|
89
|
+
"typescript": "5.9.2",
|
|
90
90
|
"vitest": "^3.2.4",
|
|
91
|
-
"vue-tsc": "^
|
|
91
|
+
"vue-tsc": "^3.0.5"
|
|
92
92
|
},
|
|
93
93
|
"pnpm": {
|
|
94
94
|
"onlyBuiltDependencies": [
|