sveltekit-auth-example 2.0.8 → 2.1.1
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/.yarnrc.yml +0 -2
- package/CHANGELOG.md +4 -0
- package/README.md +1 -1
- package/package.json +24 -24
- package/src/routes/+layout.svelte +2 -3
- package/src/routes/auth/reset/[token]/+page.svelte +2 -2
- package/src/routes/forgot/+page.svelte +2 -2
- package/src/routes/login/+page.svelte +2 -2
- package/src/routes/profile/+page.svelte +2 -2
- package/src/routes/register/+page.svelte +2 -2
- package/.yarn/install-state.gz +0 -0
- package/.yarn/releases/yarn-4.4.1.cjs +0 -925
package/.yarnrc.yml
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
- Add password complexity checking on /register and /profile pages (only checks for length currently despite what the pages say)
|
|
4
4
|
|
|
5
|
+
# 2.1.0
|
|
6
|
+
- Bump svelte, @sveltejs/kit, @sveltejs/adapter-node, @sveltejs/vite-plugin-svelte, @sendgrid/mail, pg, google-auth-library, @eslint/js, yarn, @types/google.accounts, @types/jsonwebtoken, @types/pg, eslint, eslint-plugin-svelte, globals, prettier-plugin-svelte, sass, svelte-check, tslib, typescript, typescript-eslint, vite, vitest
|
|
7
|
+
- Change Typescript casting to use "as" since the Svelte 5 has an issue with angle brackets style
|
|
8
|
+
|
|
5
9
|
# 2.0.8
|
|
6
10
|
- Bump svelte, @sveltejs/kit, @sveltejs/vite-plugin-svelte, google-auth-library and other devDependencies
|
|
7
11
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SvelteKit Authentication and Authorization Example
|
|
2
2
|
|
|
3
|
-
**Updated for SvelteKit 2.
|
|
3
|
+
**Updated for Svelte 5 and SvelteKit 2.7.3**
|
|
4
4
|
|
|
5
5
|
This is an example of how to register, authenticate, and update users and limit their access to
|
|
6
6
|
areas of the website by role (admin, teacher, student). It includes profile management and password resets via SendGrid.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sveltekit-auth-example",
|
|
3
3
|
"description": "SvelteKit Authentication Example",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.1.1",
|
|
5
5
|
"author": "Nate Stuyvesant",
|
|
6
6
|
"license": "https://github.com/nstuyvesant/sveltekit-auth-example/blob/master/LICENSE",
|
|
7
7
|
"repository": {
|
|
@@ -35,37 +35,37 @@
|
|
|
35
35
|
},
|
|
36
36
|
"type": "module",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@sendgrid/mail": "^8.1.
|
|
39
|
-
"pg": "^8.
|
|
38
|
+
"@sendgrid/mail": "^8.1.4",
|
|
39
|
+
"pg": "^8.13.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@eslint/js": "^9.
|
|
43
|
-
"@sveltejs/adapter-node": "^5.2.
|
|
44
|
-
"@sveltejs/kit": "^2.
|
|
45
|
-
"@sveltejs/vite-plugin-svelte": "^
|
|
42
|
+
"@eslint/js": "^9.13.0",
|
|
43
|
+
"@sveltejs/adapter-node": "^5.2.9",
|
|
44
|
+
"@sveltejs/kit": "^2.7.3",
|
|
45
|
+
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
|
46
46
|
"@types/bootstrap": "5.2.10",
|
|
47
|
-
"@types/google.accounts": "^0.0.
|
|
48
|
-
"@types/jsonwebtoken": "^9.0.
|
|
49
|
-
"@types/pg": "^8.11.
|
|
47
|
+
"@types/google.accounts": "^0.0.15",
|
|
48
|
+
"@types/jsonwebtoken": "^9.0.7",
|
|
49
|
+
"@types/pg": "^8.11.10",
|
|
50
50
|
"bootstrap": "^5.3.3",
|
|
51
|
-
"eslint": "^9.
|
|
51
|
+
"eslint": "^9.13.0",
|
|
52
52
|
"eslint-config-prettier": "^9.1.0",
|
|
53
53
|
"eslint-plugin-prettier": "^5.2.1",
|
|
54
|
-
"eslint-plugin-svelte": "^2.
|
|
55
|
-
"globals": "^15.
|
|
56
|
-
"google-auth-library": "^9.14.
|
|
54
|
+
"eslint-plugin-svelte": "^2.46.0",
|
|
55
|
+
"globals": "^15.11.0",
|
|
56
|
+
"google-auth-library": "^9.14.2",
|
|
57
57
|
"jsonwebtoken": "^9.0.2",
|
|
58
58
|
"prettier": "^3.3.3",
|
|
59
|
-
"prettier-plugin-svelte": "^3.2.
|
|
60
|
-
"sass": "^1.
|
|
61
|
-
"svelte": "^
|
|
62
|
-
"svelte-check": "^4.0.
|
|
63
|
-
"tslib": "^2.
|
|
64
|
-
"typescript": "^5.
|
|
65
|
-
"typescript-eslint": "^8.
|
|
66
|
-
"vite": "^5.4.
|
|
67
|
-
"vitest": "^2.
|
|
59
|
+
"prettier-plugin-svelte": "^3.2.7",
|
|
60
|
+
"sass": "^1.80.4",
|
|
61
|
+
"svelte": "^5.1.4",
|
|
62
|
+
"svelte-check": "^4.0.5",
|
|
63
|
+
"tslib": "^2.8.0",
|
|
64
|
+
"typescript": "^5.6.3",
|
|
65
|
+
"typescript-eslint": "^8.12.1",
|
|
66
|
+
"vite": "^5.4.10",
|
|
67
|
+
"vitest": "^2.1.4"
|
|
68
68
|
},
|
|
69
|
-
"packageManager": "yarn@4.
|
|
69
|
+
"packageManager": "yarn@4.5.1",
|
|
70
70
|
"prettier": "./prettier.config.mjs"
|
|
71
71
|
}
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
|
|
49
49
|
const openToast = (open: boolean) => {
|
|
50
50
|
if (open) {
|
|
51
|
-
const toastDiv =
|
|
51
|
+
const toastDiv = document.getElementById('authToast') as HTMLDivElement
|
|
52
52
|
const t = new Toast(toastDiv)
|
|
53
53
|
t.show()
|
|
54
54
|
}
|
|
@@ -155,8 +155,7 @@
|
|
|
155
155
|
</div>
|
|
156
156
|
</main>
|
|
157
157
|
|
|
158
|
-
<style
|
|
159
|
-
// Make Retina displays crisper
|
|
158
|
+
<style global>
|
|
160
159
|
* {
|
|
161
160
|
-webkit-font-smoothing: antialiased;
|
|
162
161
|
-moz-osx-font-smoothing: grayscale;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
const resetPassword = async () => {
|
|
25
25
|
message = ''
|
|
26
|
-
const form =
|
|
26
|
+
const form = document.getElementById('reset') as HTMLFormElement
|
|
27
27
|
|
|
28
28
|
if (!passwordMatch()) {
|
|
29
29
|
confirmPassword.classList.add('is-invalid')
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
</div>
|
|
121
121
|
</div>
|
|
122
122
|
|
|
123
|
-
<style
|
|
123
|
+
<style>
|
|
124
124
|
.card-body {
|
|
125
125
|
width: 25rem;
|
|
126
126
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
const sendPasswordReset = async () => {
|
|
16
16
|
message = ''
|
|
17
|
-
const form =
|
|
17
|
+
const form = document.getElementById('forgot') as HTMLFormElement
|
|
18
18
|
|
|
19
19
|
if (form.checkValidity()) {
|
|
20
20
|
if (email.toLowerCase().includes('gmail.com')) {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
</div>
|
|
82
82
|
</div>
|
|
83
83
|
|
|
84
|
-
<style
|
|
84
|
+
<style>
|
|
85
85
|
.card-body {
|
|
86
86
|
width: 25rem;
|
|
87
87
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
async function login() {
|
|
17
17
|
message = ''
|
|
18
|
-
const form =
|
|
18
|
+
const form = document.getElementById('signIn') as HTMLFormElement
|
|
19
19
|
|
|
20
20
|
if (form.checkValidity()) {
|
|
21
21
|
try {
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
</div>
|
|
146
146
|
</div>
|
|
147
147
|
|
|
148
|
-
<style
|
|
148
|
+
<style>
|
|
149
149
|
.card-body {
|
|
150
150
|
width: 25rem;
|
|
151
151
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
async function update() {
|
|
19
19
|
message = ''
|
|
20
|
-
const form =
|
|
20
|
+
const form = document.getElementById('profile') as HTMLFormElement
|
|
21
21
|
|
|
22
22
|
if (!user?.email?.includes('gmail.com') && !passwordMatch()) {
|
|
23
23
|
confirmPassword.classList.add('is-invalid')
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
</div>
|
|
157
157
|
</div>
|
|
158
158
|
|
|
159
|
-
<style
|
|
159
|
+
<style>
|
|
160
160
|
.card-body {
|
|
161
161
|
width: 25rem;
|
|
162
162
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
let message: string
|
|
21
21
|
|
|
22
22
|
async function register() {
|
|
23
|
-
const form =
|
|
23
|
+
const form = document.getElementById('register') as HTMLFormElement
|
|
24
24
|
message = ''
|
|
25
25
|
|
|
26
26
|
if (!passwordMatch()) {
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
</div>
|
|
198
198
|
</div>
|
|
199
199
|
|
|
200
|
-
<style
|
|
200
|
+
<style>
|
|
201
201
|
.card-body {
|
|
202
202
|
width: 25rem;
|
|
203
203
|
}
|
package/.yarn/install-state.gz
DELETED
|
Binary file
|