sveltekit-auth-example 1.0.28 → 1.0.29
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 +5 -1
- package/package.json +5 -5
- package/src/hooks.server.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
# Backlog
|
|
2
2
|
* Add password complexity checking on /register and /profile pages (only checks for length currently despite what the pages say)
|
|
3
3
|
|
|
4
|
-
# 1.0.
|
|
4
|
+
# 1.0.29
|
|
5
|
+
* Fixed bug in hooks.server.ts - new version of SvelteKit complains about modifying cookie after `const response = await resolve(event)` so moved it up two lines.
|
|
6
|
+
* Update dependencies
|
|
7
|
+
|
|
8
|
+
# 1.0.28
|
|
5
9
|
* Update dependencies
|
|
6
10
|
|
|
7
11
|
# 1.0.27
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sveltekit-auth-example",
|
|
3
3
|
"description": "SvelteKit Authentication Example",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.29",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Nate Stuyvesant",
|
|
7
7
|
"license": "https://github.com/nstuyvesant/sveltekit-auth-example/blob/master/LICENSE",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"@types/google.accounts": "0.0.2",
|
|
47
47
|
"@types/jsonwebtoken": "^8.5.9",
|
|
48
48
|
"@types/pg": "^8.6.5",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
50
|
-
"@typescript-eslint/parser": "^5.
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^5.41.0",
|
|
50
|
+
"@typescript-eslint/parser": "^5.41.0",
|
|
51
51
|
"bootstrap": "^5.2.2",
|
|
52
|
-
"eslint": "^8.
|
|
52
|
+
"eslint": "^8.26.0",
|
|
53
53
|
"eslint-config-prettier": "^8.5.0",
|
|
54
54
|
"eslint-plugin-svelte3": "^4.0.0",
|
|
55
55
|
"google-auth-library": "^8.6.0",
|
|
@@ -62,6 +62,6 @@
|
|
|
62
62
|
"svelte-preprocess": "^4.10.7",
|
|
63
63
|
"tslib": "^2.4.0",
|
|
64
64
|
"typescript": "^4.8.4",
|
|
65
|
-
"vite": "^3.1
|
|
65
|
+
"vite": "^3.2.1"
|
|
66
66
|
}
|
|
67
67
|
}
|
package/src/hooks.server.ts
CHANGED
|
@@ -21,10 +21,11 @@ export const handle: Handle = async ({ event, resolve }) => {
|
|
|
21
21
|
await attachUserToRequestEvent(sessionId, event)
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
if (!event.locals.user) cookies.delete('session')
|
|
25
|
+
|
|
24
26
|
const response = await resolve(event)
|
|
25
27
|
|
|
26
28
|
// after endpoint or page is called
|
|
27
|
-
if (!event.locals.user) cookies.delete('session')
|
|
28
29
|
|
|
29
30
|
return response
|
|
30
31
|
}
|