mirror of
https://github.com/Infisical/infisical.git
synced 2025-03-25 14:05:03 +00:00
Patch EMAIL_TOKEN_LIFETIME expiring early
This commit is contained in:
@ -18,11 +18,16 @@ const tokenSchema = new Schema<IToken>({
|
||||
},
|
||||
createdAt: {
|
||||
type: Date,
|
||||
expires: parseInt(EMAIL_TOKEN_LIFETIME),
|
||||
default: Date.now
|
||||
}
|
||||
});
|
||||
|
||||
tokenSchema.index({
|
||||
createdAt: 1
|
||||
}, {
|
||||
expireAfterSeconds: parseInt(EMAIL_TOKEN_LIFETIME)
|
||||
});
|
||||
|
||||
const Token = model<IToken>('Token', tokenSchema);
|
||||
|
||||
export default Token;
|
||||
|
Reference in New Issue
Block a user