nuxt-users 1.15.1 → 1.15.2
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 +18 -0
- package/dist/cli.mjs +1 -1
- package/dist/module.json +1 -1
- package/dist/runtime/composables/useServerAuth.d.ts +1 -2
- package/dist/runtime/composables/useServerAuth.js +1 -1
- package/dist/runtime/server/utils/index.d.ts +1 -0
- package/dist/runtime/server/utils/index.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## v1.15.2
|
|
5
|
+
|
|
6
|
+
[compare changes](https://github.com/rrd108/nuxt-users/compare/v1.15.1...v1.15.2)
|
|
7
|
+
|
|
8
|
+
### 🩹 Fixes
|
|
9
|
+
|
|
10
|
+
- Import path ([1d1013e](https://github.com/rrd108/nuxt-users/commit/1d1013e))
|
|
11
|
+
- Add export ([90ce9b0](https://github.com/rrd108/nuxt-users/commit/90ce9b0))
|
|
12
|
+
- Dynamic imports ([26ff073](https://github.com/rrd108/nuxt-users/commit/26ff073))
|
|
13
|
+
|
|
14
|
+
### 🏡 Chore
|
|
15
|
+
|
|
16
|
+
- **release:** V1.15.1 ([214661b](https://github.com/rrd108/nuxt-users/commit/214661b))
|
|
17
|
+
|
|
18
|
+
### ❤️ Contributors
|
|
19
|
+
|
|
20
|
+
- Rrd108 ([@rrd108](https://github.com/rrd108))
|
|
21
|
+
|
|
4
22
|
## v1.15.1
|
|
5
23
|
|
|
6
24
|
[compare changes](https://github.com/rrd108/nuxt-users/compare/v1.15.0...v1.15.1)
|
package/dist/cli.mjs
CHANGED
package/dist/module.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type H3Event } from 'h3';
|
|
2
1
|
import type { UserWithoutPassword } from '../../types.js';
|
|
3
2
|
/**
|
|
4
3
|
* Server-side composable for authentication utilities
|
|
@@ -19,5 +18,5 @@ import type { UserWithoutPassword } from '../../types.js';
|
|
|
19
18
|
* ```
|
|
20
19
|
*/
|
|
21
20
|
export declare const useServerAuth: () => {
|
|
22
|
-
getCurrentUser: (event:
|
|
21
|
+
getCurrentUser: (event: unknown) => Promise<UserWithoutPassword | null>;
|
|
23
22
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getCurrentUserFromToken } from "../server/utils/user.js";
|
|
2
|
-
import { getCookie } from "h3";
|
|
3
2
|
export const useServerAuth = () => {
|
|
4
3
|
const getCurrentUser = async (event) => {
|
|
5
4
|
const { useRuntimeConfig } = await import("#imports");
|
|
5
|
+
const { getCookie } = await import("h3");
|
|
6
6
|
const token = getCookie(event, "auth_token");
|
|
7
7
|
if (!token) {
|
|
8
8
|
return null;
|
|
@@ -6,3 +6,4 @@ export { createPasswordResetTokensTable } from './create-password-reset-tokens-t
|
|
|
6
6
|
export { createMigrationsTable } from './create-migrations-table.js';
|
|
7
7
|
export { runMigrations } from './migrate.js';
|
|
8
8
|
export { useNuxtUsersDatabase } from '../../composables/useNuxtUsersDatabase.js';
|
|
9
|
+
export { useServerAuth } from '../../composables/useServerAuth.js';
|
|
@@ -6,3 +6,4 @@ export { createPasswordResetTokensTable } from "./create-password-reset-tokens-t
|
|
|
6
6
|
export { createMigrationsTable } from "./create-migrations-table.js";
|
|
7
7
|
export { runMigrations } from "./migrate.js";
|
|
8
8
|
export { useNuxtUsersDatabase } from "../../composables/useNuxtUsersDatabase.js";
|
|
9
|
+
export { useServerAuth } from "../../composables/useServerAuth.js";
|
package/package.json
CHANGED