Make backend login stateless

This commit is contained in:
Maidul Islam
2023-01-25 20:09:57 -08:00
parent be2945c445
commit ae0ee727fa
2 changed files with 40 additions and 9 deletions
+23
View File
@@ -0,0 +1,23 @@
import mongoose, { Schema, model } from 'mongoose';
const LoginSRPDetailSchema = new Schema(
{
clientPublicKey: {
type: String,
required: true
},
email: {
type: String,
required: true,
unique: true
},
serverBInt: { type: mongoose.Schema.Types.Buffer },
expireAt: { type: Date }
}
);
const LoginSRPDetail = model('LoginSRPDetail', LoginSRPDetailSchema);
// LoginSRPDetailSchema.index({ "expireAt": 1 }, { expireAfterSeconds: 0 });
export default LoginSRPDetail;