feat: Implement password reset and change functionality
Co-authored-by: mathieumoran1 <[email protected]>
This commit is contained in:
co-authored by
mathieumoran1
parent
7a5ef7e9a0
commit
c83b4685a2
@@ -5,6 +5,10 @@ const userSchema = new mongoose.Schema({
|
||||
email: { type: String, required: true, unique: true },
|
||||
password: { type: String, required: true },
|
||||
role: { type: Number, default: 0 },
|
||||
// If true, user must change password on next login (e.g. after admin reset)
|
||||
mustChangePassword: { type: Boolean, default: false },
|
||||
tempPasswordIssuedAt: { type: Date, default: null },
|
||||
tempPasswordExpiresAt: { type: Date, default: null },
|
||||
watchedMovies: [{
|
||||
imdb_id: { type: String, required: false },
|
||||
watchedDate: { type: Date, default: Date.now } // Store the watched date
|
||||
|
||||
Reference in New Issue
Block a user