Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

forget mot de passe api nodejs mongodb example

const mongoose = require('mongoose');


const resettokenSchema = new mongoose.Schema({
_userId: { type: mongoose.Schema.Types.ObjectId, required: true, ref: 'User' },
resettoken: { type: String, required: true },
createdAt: { type: Date, required: true, default: Date.now, expires: 43200 },
});


module.exports = mongoose.model('passwordResetToken', resettokenSchema);
Source by hackernoon.com #
 
PREVIOUS NEXT
Tagged: #forget #mot #de #passe #api #nodejs #mongodb
ADD COMMENT
Topic
Name
5+4 =