feat(server): auto refresh session (#6613)

This commit is contained in:
EYHN
2024-04-19 07:00:12 +00:00
parent a2fa9149ff
commit 5e243de392
7 changed files with 82 additions and 16 deletions

View File

@@ -240,6 +240,13 @@ export interface AFFiNEConfig {
* @default 15 days
*/
ttl: number;
/**
* Application auth time to refresh in seconds
*
* @default 7 days
*/
ttr: number;
};
/**

View File

@@ -153,6 +153,7 @@ export const getDefaultAFFiNEConfig: () => AFFiNEConfig = () => {
},
session: {
ttl: 15 * ONE_DAY_IN_SEC,
ttr: 7 * ONE_DAY_IN_SEC,
},
accessToken: {
ttl: 7 * ONE_DAY_IN_SEC,