@logto/next 1.0.0-beta.13 → 1.0.0-beta.14
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/lib/module.d.mts +30 -0
- package/package.json +4 -4
package/lib/module.d.mts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LogtoConfig, GetContextParameters } from "@logto/node";
|
|
2
|
+
import { GetServerSidePropsContext, GetServerSidePropsResult, NextApiHandler } from "next";
|
|
3
|
+
declare module 'iron-session' {
|
|
4
|
+
interface IronSessionData {
|
|
5
|
+
accessToken?: string;
|
|
6
|
+
idToken?: string;
|
|
7
|
+
signInSession?: string;
|
|
8
|
+
refreshToken?: string;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
type LogtoNextConfig = LogtoConfig & {
|
|
12
|
+
cookieSecret: string;
|
|
13
|
+
cookieSecure: boolean;
|
|
14
|
+
baseUrl: string;
|
|
15
|
+
};
|
|
16
|
+
export { ReservedScope, UserScope } from '@logto/node';
|
|
17
|
+
export type { LogtoContext } from '@logto/node';
|
|
18
|
+
export default class LogtoClient {
|
|
19
|
+
constructor(config: LogtoNextConfig);
|
|
20
|
+
handleSignIn: (redirectUri?: string) => NextApiHandler;
|
|
21
|
+
handleSignInCallback: (redirectTo?: string) => NextApiHandler;
|
|
22
|
+
handleSignOut: (redirectUri?: string) => NextApiHandler;
|
|
23
|
+
handleUser: (configs?: GetContextParameters) => NextApiHandler<any>;
|
|
24
|
+
handleAuthRoutes: (configs?: GetContextParameters) => NextApiHandler;
|
|
25
|
+
withLogtoApiRoute: (handler: NextApiHandler, config?: GetContextParameters) => NextApiHandler;
|
|
26
|
+
withLogtoSsr: <P extends Record<string, unknown> = Record<string, unknown>>(handler: (context: GetServerSidePropsContext) => GetServerSidePropsResult<P> | Promise<GetServerSidePropsResult<P>>, configs?: GetContextParameters) => (context: GetServerSidePropsContext<import("querystring").ParsedUrlQuery, import("next").PreviewData>) => Promise<GetServerSidePropsResult<P>>;
|
|
27
|
+
private get ironSessionConfigs();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/next",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.14",
|
|
4
4
|
"source": "./src/index.ts",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"dev:tsc": "tsc -p tsconfig.build.json -w --preserveWatchOutput",
|
|
23
23
|
"precommit": "lint-staged",
|
|
24
24
|
"check": "tsc --noEmit",
|
|
25
|
-
"build": "rm -rf lib/ && pnpm check && parcel build",
|
|
25
|
+
"build": "rm -rf lib/ && pnpm check && parcel build && cp lib/index.d.ts lib/module.d.mts",
|
|
26
26
|
"lint": "eslint --ext .ts src",
|
|
27
27
|
"test": "jest",
|
|
28
28
|
"test:coverage": "jest --silent --coverage",
|
|
29
29
|
"prepack": "pnpm test"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@logto/node": "^1.0.0-beta.
|
|
32
|
+
"@logto/node": "^1.0.0-beta.14",
|
|
33
33
|
"iron-session": "^6.1.3"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "2b391f477b116a1adbf100696d7bf32c25f019e9"
|
|
77
77
|
}
|