Implemented a password reset timeout

ref #40
This commit is contained in:
niggl committed 2020-12-22 11:12:24 +01:00
1 parent 48685451be
commit 17ee682029
3 files changed
+25 -2

No files matched your search

+9
View File
@@ -111,6 +111,15 @@ export class User extends Principal {
@IsOptional()
profilePic?: string;
/**
* The last time the user requested a password reset.
* Used to prevent spamming of the password reset route.
*/
@Column({ nullable: true, unique: true })
@IsString()
@IsOptional()
resetRequestedTimestamp?: number;
/**
* The actions performed by this user.
* For documentation purposes only, will be implemented later.