mirror of
https://github.com/logto-io/logto.git
synced 2025-01-20 21:32:31 -05:00
chore(core): add default ttl settings (#1429)
add default ttl settings to avoid oidc warning
This commit is contained in:
parent
78407fc6c9
commit
0240e5cac2
1 changed files with 10 additions and 0 deletions
|
@ -132,6 +132,16 @@ export default async function initOidc(app: Koa): Promise<Provider> {
|
|||
|
||||
return refreshTokenTtl ?? defaultRefreshTokenTtl;
|
||||
},
|
||||
AccessToken: (ctx, token) => {
|
||||
if (token.resourceServer) {
|
||||
return token.resourceServer.accessTokenTTL ?? 60 * 60; // 1 hour in seconds
|
||||
}
|
||||
|
||||
return 60 * 60; // 1 hour in seconds
|
||||
},
|
||||
Interaction: 3600 /* 1 hour in seconds */,
|
||||
Session: 1_209_600 /* 14 days in seconds */,
|
||||
Grant: 1_209_600 /* 14 days in seconds */,
|
||||
},
|
||||
extraTokenClaims: async (_ctx, token) => {
|
||||
// AccessToken type is not exported by default, need to asset token is AccessToken
|
||||
|
|
Loading…
Add table
Reference in a new issue