naystack 1.5.8 → 1.5.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.
- package/dist/auth/email/index.cjs.js +6 -0
- package/dist/auth/email/index.d.mts +1 -1
- package/dist/auth/email/index.d.ts +1 -1
- package/dist/auth/email/index.esm.js +5 -0
- package/dist/auth/email/utils.cjs.js +6 -0
- package/dist/auth/email/utils.d.mts +2 -1
- package/dist/auth/email/utils.d.ts +2 -1
- package/dist/auth/email/utils.esm.js +5 -0
- package/dist/auth/index.cjs.js +6 -0
- package/dist/auth/index.d.mts +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.esm.js +5 -0
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ var email_exports = {};
|
|
|
22
22
|
__export(email_exports, {
|
|
23
23
|
checkAuthStatus: () => checkAuthStatus,
|
|
24
24
|
getContext: () => getContext,
|
|
25
|
+
getCurrentRefreshToken: () => getCurrentRefreshToken,
|
|
25
26
|
getEmailAuthRoutes: () => getEmailAuthRoutes,
|
|
26
27
|
logout: () => logout
|
|
27
28
|
});
|
|
@@ -228,6 +229,10 @@ async function logout(data) {
|
|
|
228
229
|
body: JSON.stringify(data)
|
|
229
230
|
});
|
|
230
231
|
}
|
|
232
|
+
async function getCurrentRefreshToken() {
|
|
233
|
+
const Cookie = await (0, import_headers2.cookies)();
|
|
234
|
+
return Cookie.get(REFRESH_COOKIE_NAME)?.value;
|
|
235
|
+
}
|
|
231
236
|
|
|
232
237
|
// src/auth/email/routes/delete.ts
|
|
233
238
|
var getDeleteRoute = (options) => async (req) => {
|
|
@@ -322,6 +327,7 @@ function getEmailAuthRoutes(options) {
|
|
|
322
327
|
0 && (module.exports = {
|
|
323
328
|
checkAuthStatus,
|
|
324
329
|
getContext,
|
|
330
|
+
getCurrentRefreshToken,
|
|
325
331
|
getEmailAuthRoutes,
|
|
326
332
|
logout
|
|
327
333
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as next_server from 'next/server';
|
|
2
2
|
import { InitRoutesOptions } from './types.mjs';
|
|
3
3
|
export { checkAuthStatus } from './token.mjs';
|
|
4
|
-
export { getContext, logout } from './utils.mjs';
|
|
4
|
+
export { getContext, getCurrentRefreshToken, logout } from './utils.mjs';
|
|
5
5
|
import '../types.mjs';
|
|
6
6
|
import '../../graphql/types.mjs';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as next_server from 'next/server';
|
|
2
2
|
import { InitRoutesOptions } from './types.js';
|
|
3
3
|
export { checkAuthStatus } from './token.js';
|
|
4
|
-
export { getContext, logout } from './utils.js';
|
|
4
|
+
export { getContext, getCurrentRefreshToken, logout } from './utils.js';
|
|
5
5
|
import '../types.js';
|
|
6
6
|
import '../../graphql/types.js';
|
|
7
7
|
|
|
@@ -199,6 +199,10 @@ async function logout(data) {
|
|
|
199
199
|
body: JSON.stringify(data)
|
|
200
200
|
});
|
|
201
201
|
}
|
|
202
|
+
async function getCurrentRefreshToken() {
|
|
203
|
+
const Cookie = await cookies2();
|
|
204
|
+
return Cookie.get(REFRESH_COOKIE_NAME)?.value;
|
|
205
|
+
}
|
|
202
206
|
|
|
203
207
|
// src/auth/email/routes/delete.ts
|
|
204
208
|
var getDeleteRoute = (options) => async (req) => {
|
|
@@ -292,6 +296,7 @@ function getEmailAuthRoutes(options) {
|
|
|
292
296
|
export {
|
|
293
297
|
checkAuthStatus,
|
|
294
298
|
getContext,
|
|
299
|
+
getCurrentRefreshToken,
|
|
295
300
|
getEmailAuthRoutes,
|
|
296
301
|
logout
|
|
297
302
|
};
|
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var utils_exports = {};
|
|
22
22
|
__export(utils_exports, {
|
|
23
23
|
getContext: () => getContext,
|
|
24
|
+
getCurrentRefreshToken: () => getCurrentRefreshToken,
|
|
24
25
|
logout: () => logout,
|
|
25
26
|
massageRequest: () => massageRequest,
|
|
26
27
|
verifyCaptcha: () => verifyCaptcha
|
|
@@ -186,9 +187,14 @@ async function logout(data) {
|
|
|
186
187
|
body: JSON.stringify(data)
|
|
187
188
|
});
|
|
188
189
|
}
|
|
190
|
+
async function getCurrentRefreshToken() {
|
|
191
|
+
const Cookie = await (0, import_headers2.cookies)();
|
|
192
|
+
return Cookie.get(REFRESH_COOKIE_NAME)?.value;
|
|
193
|
+
}
|
|
189
194
|
// Annotate the CommonJS export names for ESM import in node:
|
|
190
195
|
0 && (module.exports = {
|
|
191
196
|
getContext,
|
|
197
|
+
getCurrentRefreshToken,
|
|
192
198
|
logout,
|
|
193
199
|
massageRequest,
|
|
194
200
|
verifyCaptcha
|
|
@@ -14,5 +14,6 @@ declare function massageRequest(req: NextRequest, options: InitRoutesOptions): P
|
|
|
14
14
|
declare function verifyCaptcha(token: string, secret?: string): Promise<boolean>;
|
|
15
15
|
declare const getContext: (req: NextRequest) => Context;
|
|
16
16
|
declare function logout(data?: object): Promise<void>;
|
|
17
|
+
declare function getCurrentRefreshToken(): Promise<string | undefined>;
|
|
17
18
|
|
|
18
|
-
export { getContext, logout, massageRequest, verifyCaptcha };
|
|
19
|
+
export { getContext, getCurrentRefreshToken, logout, massageRequest, verifyCaptcha };
|
|
@@ -14,5 +14,6 @@ declare function massageRequest(req: NextRequest, options: InitRoutesOptions): P
|
|
|
14
14
|
declare function verifyCaptcha(token: string, secret?: string): Promise<boolean>;
|
|
15
15
|
declare const getContext: (req: NextRequest) => Context;
|
|
16
16
|
declare function logout(data?: object): Promise<void>;
|
|
17
|
+
declare function getCurrentRefreshToken(): Promise<string | undefined>;
|
|
17
18
|
|
|
18
|
-
export { getContext, logout, massageRequest, verifyCaptcha };
|
|
19
|
+
export { getContext, getCurrentRefreshToken, logout, massageRequest, verifyCaptcha };
|
|
@@ -159,8 +159,13 @@ async function logout(data) {
|
|
|
159
159
|
body: JSON.stringify(data)
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
|
+
async function getCurrentRefreshToken() {
|
|
163
|
+
const Cookie = await cookies2();
|
|
164
|
+
return Cookie.get(REFRESH_COOKIE_NAME)?.value;
|
|
165
|
+
}
|
|
162
166
|
export {
|
|
163
167
|
getContext,
|
|
168
|
+
getCurrentRefreshToken,
|
|
164
169
|
logout,
|
|
165
170
|
massageRequest,
|
|
166
171
|
verifyCaptcha
|
package/dist/auth/index.cjs.js
CHANGED
|
@@ -22,6 +22,7 @@ var auth_exports = {};
|
|
|
22
22
|
__export(auth_exports, {
|
|
23
23
|
checkAuthStatus: () => checkAuthStatus,
|
|
24
24
|
getContext: () => getContext,
|
|
25
|
+
getCurrentRefreshToken: () => getCurrentRefreshToken,
|
|
25
26
|
getEmailAuthRoutes: () => getEmailAuthRoutes,
|
|
26
27
|
getRefreshToken: () => getRefreshToken,
|
|
27
28
|
initGoogleAuth: () => initGoogleAuth,
|
|
@@ -243,6 +244,10 @@ async function logout(data) {
|
|
|
243
244
|
body: JSON.stringify(data)
|
|
244
245
|
});
|
|
245
246
|
}
|
|
247
|
+
async function getCurrentRefreshToken() {
|
|
248
|
+
const Cookie = await (0, import_headers2.cookies)();
|
|
249
|
+
return Cookie.get(REFRESH_COOKIE_NAME)?.value;
|
|
250
|
+
}
|
|
246
251
|
|
|
247
252
|
// src/auth/email/routes/delete.ts
|
|
248
253
|
var getDeleteRoute = (options) => async (req) => {
|
|
@@ -535,6 +540,7 @@ async function getRefreshToken() {
|
|
|
535
540
|
0 && (module.exports = {
|
|
536
541
|
checkAuthStatus,
|
|
537
542
|
getContext,
|
|
543
|
+
getCurrentRefreshToken,
|
|
538
544
|
getEmailAuthRoutes,
|
|
539
545
|
getRefreshToken,
|
|
540
546
|
initGoogleAuth,
|
package/dist/auth/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ export { initGoogleAuth } from './google/index.mjs';
|
|
|
3
3
|
export { initInstagramAuth } from './instagram/index.mjs';
|
|
4
4
|
export { getRefreshToken } from './utils/token.mjs';
|
|
5
5
|
export { checkAuthStatus } from './email/token.mjs';
|
|
6
|
-
export { getContext, logout } from './email/utils.mjs';
|
|
6
|
+
export { getContext, getCurrentRefreshToken, logout } from './email/utils.mjs';
|
|
7
7
|
import 'next/server';
|
|
8
8
|
import './email/types.mjs';
|
|
9
9
|
import './types.mjs';
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { initGoogleAuth } from './google/index.js';
|
|
|
3
3
|
export { initInstagramAuth } from './instagram/index.js';
|
|
4
4
|
export { getRefreshToken } from './utils/token.js';
|
|
5
5
|
export { checkAuthStatus } from './email/token.js';
|
|
6
|
-
export { getContext, logout } from './email/utils.js';
|
|
6
|
+
export { getContext, getCurrentRefreshToken, logout } from './email/utils.js';
|
|
7
7
|
import 'next/server';
|
|
8
8
|
import './email/types.js';
|
|
9
9
|
import './types.js';
|
package/dist/auth/index.esm.js
CHANGED
|
@@ -211,6 +211,10 @@ async function logout(data) {
|
|
|
211
211
|
body: JSON.stringify(data)
|
|
212
212
|
});
|
|
213
213
|
}
|
|
214
|
+
async function getCurrentRefreshToken() {
|
|
215
|
+
const Cookie = await cookies2();
|
|
216
|
+
return Cookie.get(REFRESH_COOKIE_NAME)?.value;
|
|
217
|
+
}
|
|
214
218
|
|
|
215
219
|
// src/auth/email/routes/delete.ts
|
|
216
220
|
var getDeleteRoute = (options) => async (req) => {
|
|
@@ -502,6 +506,7 @@ async function getRefreshToken() {
|
|
|
502
506
|
export {
|
|
503
507
|
checkAuthStatus,
|
|
504
508
|
getContext,
|
|
509
|
+
getCurrentRefreshToken,
|
|
505
510
|
getEmailAuthRoutes,
|
|
506
511
|
getRefreshToken,
|
|
507
512
|
initGoogleAuth,
|