mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
* ✨ feat: Implement session management with CRUD operations and integrate into user workflows * ✨ refactor: Update session model import paths and enhance session creation logic in AuthService * ✨ refactor: Validate session and user ID formats in session management functions * ✨ style: Enhance UI components with improved styling and accessibility features * chore: Update login form tests to use getByTestId instead of getByRole, remove console.log() * chore: Update login form tests to use getByTestId instead of getByRole --------- Co-authored-by: Danny Avila <danny@librechat.ai>
20 lines
348 B
JavaScript
20 lines
348 B
JavaScript
const mongoose = require('mongoose');
|
|
|
|
const sessionSchema = mongoose.Schema({
|
|
refreshTokenHash: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
expiration: {
|
|
type: Date,
|
|
required: true,
|
|
expires: 0,
|
|
},
|
|
user: {
|
|
type: mongoose.Schema.Types.ObjectId,
|
|
ref: 'User',
|
|
required: true,
|
|
},
|
|
});
|
|
|
|
module.exports = sessionSchema;
|