mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 01:01:09 +02:00
🐛 fix(mana-core-auth): use body-parser for urlencoded OAuth token requests
This commit is contained in:
parent
03abacc854
commit
0d9864784f
3 changed files with 282 additions and 508 deletions
777
pnpm-lock.yaml
generated
777
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -33,12 +33,14 @@
|
|||
"@nestjs/throttler": "^6.2.1",
|
||||
"bcrypt": "^5.1.1",
|
||||
"better-auth": "^1.4.3",
|
||||
"body-parser": "^2.2.2",
|
||||
"class-transformer": "^0.5.1",
|
||||
"class-validator": "^0.14.1",
|
||||
"cookie-parser": "^1.4.7",
|
||||
"dotenv": "^16.4.7",
|
||||
"drizzle-kit": "^0.30.2",
|
||||
"drizzle-orm": "^0.38.3",
|
||||
"duckdb-async": "^1.1.1",
|
||||
"helmet": "^8.0.0",
|
||||
"jose": "^6.1.2",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
|
|
@ -51,14 +53,14 @@
|
|||
"rxjs": "^7.8.1",
|
||||
"stripe": "^17.5.0",
|
||||
"winston": "^3.17.0",
|
||||
"zod": "^3.24.1",
|
||||
"duckdb-async": "^1.1.1"
|
||||
"zod": "^3.24.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "^11.0.0",
|
||||
"@nestjs/schematics": "^11.0.0",
|
||||
"@nestjs/testing": "^10.4.15",
|
||||
"@types/bcrypt": "^5.0.2",
|
||||
"@types/body-parser": "^1.19.6",
|
||||
"@types/cookie-parser": "^1.4.7",
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/jest": "^29.5.14",
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
import { NestFactory } from '@nestjs/core';
|
||||
import { ValidationPipe, RequestMethod } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { Request, Response, NextFunction, urlencoded, json } from 'express';
|
||||
import type { Request, Response, NextFunction } from 'express';
|
||||
import helmet from 'helmet';
|
||||
import cookieParser from 'cookie-parser';
|
||||
import * as bodyParser from 'body-parser';
|
||||
import { AppModule } from './app.module';
|
||||
import { MetricsService } from './metrics/metrics.service';
|
||||
|
||||
|
|
@ -70,8 +71,8 @@ async function bootstrap() {
|
|||
app.use(cookieParser());
|
||||
|
||||
// Explicit body parsers for form-urlencoded (needed for OAuth2 token endpoint)
|
||||
app.use(json());
|
||||
app.use(urlencoded({ extended: true }));
|
||||
app.use(bodyParser.json());
|
||||
app.use(bodyParser.urlencoded({ extended: true }));
|
||||
|
||||
// CORS configuration
|
||||
const corsOrigins = configService.get<string[]>('cors.origin') || [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue