@auth/solid-start 0.6.1 → 0.7.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  ISC License
2
2
 
3
- Copyright (c) 2022-2023, Balázs Orbán
3
+ Copyright (c) 2022-2024, Balázs Orbán
4
4
 
5
5
  Permission to use, copy, modify, and/or distribute this software for any
6
6
  purpose with or without fee is hereby granted, provided that the above
package/index.d.ts CHANGED
@@ -13,11 +13,11 @@
13
13
  * npm install @auth/core @auth/solid-start
14
14
  * ```
15
15
  *
16
- * We recommended to using [create-jd-app](https://github.com/OrJDev/create-jd-app)
17
- *
18
16
  * @module @auth/solid-start
19
17
  */
20
18
  import type { AuthConfig, Session } from "@auth/core/types";
19
+ export { AuthError, CredentialsSignin } from "@auth/core/errors";
20
+ export type { Account, DefaultSession, Profile, Session, User, } from "@auth/core/types";
21
21
  export interface SolidAuthConfig extends AuthConfig {
22
22
  /**
23
23
  * Defines the base path for the auth routes.
@@ -36,7 +36,7 @@ export interface SolidAuthConfig extends AuthConfig {
36
36
  *
37
37
  * ## Creating the API handler
38
38
  *
39
- * in this example we are using github so make sure to set the following environment variables:
39
+ * This example uses github, make sure to set the following environment variables:
40
40
  *
41
41
  * ```
42
42
  * GITHUB_ID=your_github_oauth_id
@@ -86,7 +86,7 @@ export interface SolidAuthConfig extends AuthConfig {
86
86
  *
87
87
  * ### When Using SSR
88
88
  *
89
- * When using SSR, I recommend creating a `Protected` component that will trigger suspense using the `Show` component. It should look like this:
89
+ * When using SSR, it is recommended to create a `Protected` component that will trigger suspense using the `Show` component. It should look like this:
90
90
  *
91
91
  *
92
92
  * ```tsx
@@ -150,7 +150,7 @@ export interface SolidAuthConfig extends AuthConfig {
150
150
  *
151
151
  * ### When Using CSR
152
152
  *
153
- * When using CSR, the `Protected` component will not work as expected and will cause the screen to flash, so I had to come up with a tricky solution, we will use a Solid-Start middleware:
153
+ * When using CSR, the `Protected` component will not work as expected and will cause the screen to flash. To fix this, a Solid-Start middleware is used:
154
154
  *
155
155
  * ```tsx
156
156
  * // entry-server.tsx
@@ -182,7 +182,7 @@ export interface SolidAuthConfig extends AuthConfig {
182
182
  * );
183
183
  * ```
184
184
  *
185
- * And now you can easily create a protected route:
185
+ * And now a protected route can be created:
186
186
  *
187
187
  *
188
188
  * ```tsx
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAc,UAAU,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAEvE,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AA6BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+KG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,eAAe;eAU5B,GAAG;gBAGF,GAAG;EAIxB;AAED,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAA;AAEtD,wBAAsB,UAAU,CAC9B,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,GAC/B,gBAAgB,CAiBlB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAc,UAAU,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAEvE,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAChE,YAAY,EACV,OAAO,EACP,cAAc,EACd,OAAO,EACP,OAAO,EACP,IAAI,GACL,MAAM,kBAAkB,CAAA;AAEzB,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AA6BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+KG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,eAAe;eAU5B,GAAG;gBAGF,GAAG;EAIxB;AAED,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAA;AAEtD,wBAAsB,UAAU,CAC9B,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,GAC/B,gBAAgB,CAiBlB"}
package/index.js CHANGED
@@ -13,11 +13,10 @@
13
13
  * npm install @auth/core @auth/solid-start
14
14
  * ```
15
15
  *
16
- * We recommended to using [create-jd-app](https://github.com/OrJDev/create-jd-app)
17
- *
18
16
  * @module @auth/solid-start
19
17
  */
20
18
  import { Auth } from "@auth/core";
19
+ export { AuthError, CredentialsSignin } from "@auth/core/errors";
21
20
  const actions = [
22
21
  "providers",
23
22
  "session",
@@ -52,7 +51,7 @@ function SolidAuthHandler(prefix, authOptions) {
52
51
  *
53
52
  * ## Creating the API handler
54
53
  *
55
- * in this example we are using github so make sure to set the following environment variables:
54
+ * This example uses github, make sure to set the following environment variables:
56
55
  *
57
56
  * ```
58
57
  * GITHUB_ID=your_github_oauth_id
@@ -102,7 +101,7 @@ function SolidAuthHandler(prefix, authOptions) {
102
101
  *
103
102
  * ### When Using SSR
104
103
  *
105
- * When using SSR, I recommend creating a `Protected` component that will trigger suspense using the `Show` component. It should look like this:
104
+ * When using SSR, it is recommended to create a `Protected` component that will trigger suspense using the `Show` component. It should look like this:
106
105
  *
107
106
  *
108
107
  * ```tsx
@@ -166,7 +165,7 @@ function SolidAuthHandler(prefix, authOptions) {
166
165
  *
167
166
  * ### When Using CSR
168
167
  *
169
- * When using CSR, the `Protected` component will not work as expected and will cause the screen to flash, so I had to come up with a tricky solution, we will use a Solid-Start middleware:
168
+ * When using CSR, the `Protected` component will not work as expected and will cause the screen to flash. To fix this, a Solid-Start middleware is used:
170
169
  *
171
170
  * ```tsx
172
171
  * // entry-server.tsx
@@ -198,7 +197,7 @@ function SolidAuthHandler(prefix, authOptions) {
198
197
  * );
199
198
  * ```
200
199
  *
201
- * And now you can easily create a protected route:
200
+ * And now a protected route can be created:
202
201
  *
203
202
  *
204
203
  * ```tsx
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@auth/solid-start",
3
3
  "description": "Authentication for SolidStart.",
4
- "version": "0.6.1",
4
+ "version": "0.7.1",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "*.js",
@@ -26,7 +26,7 @@
26
26
  "access": "public"
27
27
  },
28
28
  "dependencies": {
29
- "@auth/core": "0.27.0"
29
+ "@auth/core": "0.28.1"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@solidjs/meta": "^0.28.0",
@@ -49,7 +49,7 @@
49
49
  "scripts": {
50
50
  "build": "tsc",
51
51
  "patch": "npm version patch --no-git-tag-version",
52
- "test": "vitest -c ../utils/vitest.config.ts",
52
+ "test": "vitest run -c ../utils/vitest.config.ts",
53
53
  "clean": "rm -rf *.js *.d.ts*"
54
54
  }
55
55
  }
package/src/index.ts CHANGED
@@ -13,14 +13,21 @@
13
13
  * npm install @auth/core @auth/solid-start
14
14
  * ```
15
15
  *
16
- * We recommended to using [create-jd-app](https://github.com/OrJDev/create-jd-app)
17
- *
18
16
  * @module @auth/solid-start
19
17
  */
20
18
 
21
19
  import { Auth } from "@auth/core"
22
20
  import type { AuthAction, AuthConfig, Session } from "@auth/core/types"
23
21
 
22
+ export { AuthError, CredentialsSignin } from "@auth/core/errors"
23
+ export type {
24
+ Account,
25
+ DefaultSession,
26
+ Profile,
27
+ Session,
28
+ User,
29
+ } from "@auth/core/types"
30
+
24
31
  export interface SolidAuthConfig extends AuthConfig {
25
32
  /**
26
33
  * Defines the base path for the auth routes.
@@ -67,7 +74,7 @@ function SolidAuthHandler(prefix: string, authOptions: SolidAuthConfig) {
67
74
  *
68
75
  * ## Creating the API handler
69
76
  *
70
- * in this example we are using github so make sure to set the following environment variables:
77
+ * This example uses github, make sure to set the following environment variables:
71
78
  *
72
79
  * ```
73
80
  * GITHUB_ID=your_github_oauth_id
@@ -117,7 +124,7 @@ function SolidAuthHandler(prefix: string, authOptions: SolidAuthConfig) {
117
124
  *
118
125
  * ### When Using SSR
119
126
  *
120
- * When using SSR, I recommend creating a `Protected` component that will trigger suspense using the `Show` component. It should look like this:
127
+ * When using SSR, it is recommended to create a `Protected` component that will trigger suspense using the `Show` component. It should look like this:
121
128
  *
122
129
  *
123
130
  * ```tsx
@@ -181,7 +188,7 @@ function SolidAuthHandler(prefix: string, authOptions: SolidAuthConfig) {
181
188
  *
182
189
  * ### When Using CSR
183
190
  *
184
- * When using CSR, the `Protected` component will not work as expected and will cause the screen to flash, so I had to come up with a tricky solution, we will use a Solid-Start middleware:
191
+ * When using CSR, the `Protected` component will not work as expected and will cause the screen to flash. To fix this, a Solid-Start middleware is used:
185
192
  *
186
193
  * ```tsx
187
194
  * // entry-server.tsx
@@ -213,7 +220,7 @@ function SolidAuthHandler(prefix: string, authOptions: SolidAuthConfig) {
213
220
  * );
214
221
  * ```
215
222
  *
216
- * And now you can easily create a protected route:
223
+ * And now a protected route can be created:
217
224
  *
218
225
  *
219
226
  * ```tsx