mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
chore: remove jose as Bun now supports JWT 🍞 (#1167)
* chore: remove jose as Bun now supports JWT * chore: npm audit
This commit is contained in:
parent
9ca84edb9a
commit
5d95433c83
8 changed files with 46 additions and 68 deletions
|
|
@ -12,7 +12,7 @@ const { PORT, HOST, ALLOW_SOCIAL_LOGIN } = process.env ?? {};
|
|||
const port = Number(PORT) || 3080;
|
||||
const host = HOST || 'localhost';
|
||||
const projectPath = path.join(__dirname, '..', '..', 'client');
|
||||
const { jwtLogin, joseLogin, passportLogin } = require('../strategies');
|
||||
const { jwtLogin, passportLogin } = require('../strategies');
|
||||
|
||||
const startServer = async () => {
|
||||
await connectDb();
|
||||
|
|
@ -39,11 +39,7 @@ const startServer = async () => {
|
|||
|
||||
// OAUTH
|
||||
app.use(passport.initialize());
|
||||
if (typeof Bun !== 'undefined') {
|
||||
passport.use('jwt', await joseLogin());
|
||||
} else {
|
||||
passport.use(await jwtLogin());
|
||||
}
|
||||
passport.use(await jwtLogin());
|
||||
passport.use(passportLogin());
|
||||
|
||||
if (ALLOW_SOCIAL_LOGIN?.toLowerCase() === 'true') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue