mirror of
https://github.com/sasjs/server.git
synced 2026-01-04 21:30:05 +00:00
feat: make refresh token duration configurable
This commit is contained in:
@@ -16,6 +16,11 @@ export interface ClientPayload {
|
||||
* @example 1
|
||||
*/
|
||||
accessTokenExpiryDays?: number
|
||||
/**
|
||||
* Number of days in which access token will expire
|
||||
* @example 30
|
||||
*/
|
||||
refreshTokenExpiryDays?: number
|
||||
}
|
||||
|
||||
const ClientSchema = new Schema<ClientPayload>({
|
||||
@@ -30,6 +35,10 @@ const ClientSchema = new Schema<ClientPayload>({
|
||||
accessTokenExpiryDays: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
refreshTokenExpiryDays: {
|
||||
type: Number,
|
||||
default: 30
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user