@schemavaults/auth-common 0.9.2 → 0.9.3
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,5 +1,11 @@
|
|
|
1
1
|
import type { AuthTokenTypes } from "../token-data";
|
|
2
|
+
/**
|
|
3
|
+
* @description How long refresh tokens are valid for (in seconds)
|
|
4
|
+
*/
|
|
2
5
|
export declare const refreshTokenExpiry: number;
|
|
6
|
+
/**
|
|
7
|
+
* @description How long access tokens are valid for (in seconds)
|
|
8
|
+
*/
|
|
3
9
|
export declare const accessTokenExpiry: number;
|
|
4
10
|
/**
|
|
5
11
|
*
|
|
@@ -3,9 +3,13 @@ const oneMinute = 60;
|
|
|
3
3
|
const oneHour = oneMinute * 60;
|
|
4
4
|
const oneDay = oneHour * 24;
|
|
5
5
|
const oneWeek = oneDay * 7;
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* @description How long refresh tokens are valid for (in seconds)
|
|
8
|
+
*/
|
|
7
9
|
export const refreshTokenExpiry = oneWeek * 2;
|
|
8
|
-
|
|
10
|
+
/**
|
|
11
|
+
* @description How long access tokens are valid for (in seconds)
|
|
12
|
+
*/
|
|
9
13
|
export const accessTokenExpiry = oneHour * 1.5;
|
|
10
14
|
/**
|
|
11
15
|
* @param type Access or refresh token -- determines the expiry time
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-expiry.js","sourceRoot":"","sources":["../../src/token-data/token-expiry.ts"],"names":[],"mappings":"AAEA,+BAA+B;AAC/B,MAAM,SAAS,GAAW,EAAW,CAAC;AACtC,MAAM,OAAO,GAAW,SAAS,GAAG,EAAE,CAAC;AACvC,MAAM,MAAM,GAAW,OAAO,GAAG,EAAE,CAAC;AACpC,MAAM,OAAO,GAAW,MAAM,GAAG,CAAC,CAAC;AAEnC
|
|
1
|
+
{"version":3,"file":"token-expiry.js","sourceRoot":"","sources":["../../src/token-data/token-expiry.ts"],"names":[],"mappings":"AAE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