@auth/solid-start 0.1.3 → 0.1.4
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/index.d.ts +4 -23
- package/package.json +2 -2
- package/src/index.ts +2 -2
package/index.d.ts
CHANGED
|
@@ -1,25 +1,6 @@
|
|
|
1
|
+
import * as _auth_core_types from '@auth/core/types';
|
|
1
2
|
import { AuthConfig, Session } from '@auth/core/types';
|
|
2
3
|
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* :::warning
|
|
6
|
-
* `@auth/solid-start` is currently experimental. The API _will_ change in the future.
|
|
7
|
-
* :::
|
|
8
|
-
*
|
|
9
|
-
* SolidStart Auth is the official SolidStart integration for Auth.js.
|
|
10
|
-
* It provides a simple way to add authentication to your SolidStart app in a few lines of code.
|
|
11
|
-
*
|
|
12
|
-
* ## Installation
|
|
13
|
-
*
|
|
14
|
-
* ```bash npm2yarn
|
|
15
|
-
* npm install @auth/core @auth/solid-start
|
|
16
|
-
* ```
|
|
17
|
-
*
|
|
18
|
-
* We recommended to using [create-jd-app](https://github.com/OrJDev/create-jd-app)
|
|
19
|
-
*
|
|
20
|
-
* @module index
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
4
|
interface SolidAuthConfig extends AuthConfig {
|
|
24
5
|
/**
|
|
25
6
|
* Defines the base path for the auth routes.
|
|
@@ -204,10 +185,10 @@ interface SolidAuthConfig extends AuthConfig {
|
|
|
204
185
|
*
|
|
205
186
|
*/
|
|
206
187
|
declare function SolidAuth(config: SolidAuthConfig): {
|
|
207
|
-
GET(event: any): Promise<
|
|
208
|
-
POST(event: any): Promise<
|
|
188
|
+
GET(event: any): Promise<_auth_core_types.ResponseInternal<any> | undefined>;
|
|
189
|
+
POST(event: any): Promise<_auth_core_types.ResponseInternal<any> | undefined>;
|
|
209
190
|
};
|
|
210
191
|
type GetSessionResult = Promise<Session | null>;
|
|
211
|
-
declare function getSession(req: Request, options: AuthConfig): GetSessionResult;
|
|
192
|
+
declare function getSession(req: Request, options: Omit<AuthConfig, "raw">): GetSessionResult;
|
|
212
193
|
|
|
213
194
|
export { GetSessionResult, SolidAuth, SolidAuthConfig, getSession };
|
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.1.
|
|
4
|
+
"version": "0.1.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"client.*",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@auth/core": "0.18.
|
|
26
|
+
"@auth/core": "0.18.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@solidjs/meta": "^0.28.0",
|
package/src/index.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*
|
|
16
16
|
* We recommended to using [create-jd-app](https://github.com/OrJDev/create-jd-app)
|
|
17
17
|
*
|
|
18
|
-
* @module
|
|
18
|
+
* @module @auth/solid-start
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
import { Auth } from "@auth/core"
|
|
@@ -255,7 +255,7 @@ export type GetSessionResult = Promise<Session | null>
|
|
|
255
255
|
|
|
256
256
|
export async function getSession(
|
|
257
257
|
req: Request,
|
|
258
|
-
options: AuthConfig
|
|
258
|
+
options: Omit<AuthConfig, "raw">
|
|
259
259
|
): GetSessionResult {
|
|
260
260
|
options.secret ??= process.env.AUTH_SECRET
|
|
261
261
|
options.trustHost ??= true
|