mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-24 00:43:29 +10:00
Implement OpenID Connect Authentication Strategy (works with Keycloak, Authentik etc.)
This commit is contained in:
@@ -4,6 +4,7 @@ import { NestFactory } from "@nestjs/core";
|
||||
import { NestExpressApplication } from "@nestjs/platform-express";
|
||||
import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger";
|
||||
import cookieParser from "cookie-parser";
|
||||
import session from "express-session";
|
||||
import helmet from "helmet";
|
||||
import { patchNestJsSwagger } from "nestjs-zod";
|
||||
|
||||
@@ -21,6 +22,15 @@ async function bootstrap() {
|
||||
// Cookie Parser
|
||||
app.use(cookieParser());
|
||||
|
||||
// Session
|
||||
app.use(
|
||||
session({
|
||||
resave: false,
|
||||
saveUninitialized: false,
|
||||
secret: configService.getOrThrow("ACCESS_TOKEN_SECRET"),
|
||||
}),
|
||||
);
|
||||
|
||||
// CORS
|
||||
app.enableCors({
|
||||
credentials: true,
|
||||
|
||||
Reference in New Issue
Block a user