@nekm/svelte-core 1.7.8 → 1.7.9
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.
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { Handle, RequestEvent } from "@sveltejs/kit";
|
|
2
|
-
export interface ProtectTokens
|
|
3
|
-
readonly auth:
|
|
4
|
-
readonly id:
|
|
5
|
-
readonly access:
|
|
2
|
+
export interface ProtectTokens {
|
|
3
|
+
readonly auth: unknown;
|
|
4
|
+
readonly id: unknown;
|
|
5
|
+
readonly access: unknown;
|
|
6
6
|
}
|
|
7
|
-
export interface ProtectConfig
|
|
7
|
+
export interface ProtectConfig {
|
|
8
8
|
readonly protect?: (event: RequestEvent) => Promise<boolean> | boolean;
|
|
9
|
-
readonly jwtDecodeAndVerifyIdToken: (token: string) => Promise<
|
|
10
|
-
readonly jwtDecodeAndVerifyAccessToken: (token: string) => Promise<
|
|
9
|
+
readonly jwtDecodeAndVerifyIdToken: (token: string) => Promise<unknown> | unknown;
|
|
10
|
+
readonly jwtDecodeAndVerifyAccessToken: (token: string) => Promise<unknown> | unknown;
|
|
11
11
|
readonly session: {
|
|
12
12
|
readonly exists: (event: RequestEvent) => Promise<boolean> | boolean;
|
|
13
13
|
readonly stateGenerate: (event: RequestEvent) => Promise<string> | string;
|
|
@@ -15,7 +15,7 @@ export interface ProtectConfig<TAuthToken = unknown, TIdToken = unknown, TAccess
|
|
|
15
15
|
};
|
|
16
16
|
readonly hooks?: {
|
|
17
17
|
readonly onLogout?: (event: RequestEvent) => Promise<void> | void;
|
|
18
|
-
readonly onLogin?: (event: RequestEvent, tokens: ProtectTokens
|
|
18
|
+
readonly onLogin?: (event: RequestEvent, tokens: ProtectTokens) => Promise<void> | void;
|
|
19
19
|
};
|
|
20
20
|
readonly oauth: {
|
|
21
21
|
readonly clientId: string;
|
package/package.json
CHANGED