Initial Version
This commit is contained in:
24
server/models/RefereshToken.js
Normal file
24
server/models/RefereshToken.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const mongoose = require('mongoose');
|
||||
const Schema = mongoose.Schema
|
||||
const tokenSchema = mongoose.Schema({
|
||||
//we need user ref in order to create accessToken of that user only
|
||||
// user: {
|
||||
// type: Schema.Types.ObjectId,
|
||||
// refPath: "sysUsers",
|
||||
// },
|
||||
refreshToken:{
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
userIP: {
|
||||
type: String
|
||||
},
|
||||
// expires: {
|
||||
// type : Date
|
||||
// },
|
||||
// sysUsers: {
|
||||
// type: String,
|
||||
// enum: ['user', 'admin','dispatcher']
|
||||
// },
|
||||
});
|
||||
module.exports = mongoose.model('refreshtoken', tokenSchema);
|
||||
Reference in New Issue
Block a user