mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 10:20:15 +01:00
WIP: first pass, massive refactor of model imports
This commit is contained in:
parent
c682d45fb2
commit
ab5450be8b
53 changed files with 179 additions and 72 deletions
|
|
@ -1,4 +1,5 @@
|
|||
const { User, logger } = require('@librechat/data-schemas');
|
||||
const mongoose = require('mongoose');
|
||||
const { logger } = require('@librechat/data-schemas');
|
||||
const {
|
||||
generateTOTPSecret,
|
||||
generateBackupCodes,
|
||||
|
|
@ -9,6 +10,8 @@ const {
|
|||
const { encryptV3 } = require('~/server/utils/crypto');
|
||||
const safeAppTitle = (process.env.APP_TITLE || 'LibreChat').replace(/\s+/g, '');
|
||||
|
||||
const User = mongoose.models.User;
|
||||
|
||||
/**
|
||||
* Enable 2FA for the user by generating a new TOTP secret and backup codes.
|
||||
* The secret is encrypted and stored, and 2FA is marked as disabled until confirmed.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue