diff --git a/backend/src/auth/auth.service.ts b/backend/src/auth/auth.service.ts index f564272..f6ad9d2 100644 --- a/backend/src/auth/auth.service.ts +++ b/backend/src/auth/auth.service.ts @@ -136,6 +136,7 @@ export class AuthService { const accessToken = await this.jwtService.generateJwt({ sub: user.uuid, username: user.username, + role: user.role, }); const session = await this.sessionsService.createSession( @@ -178,6 +179,7 @@ export class AuthService { const accessToken = await this.jwtService.generateJwt({ sub: user.uuid, username: user.username, + role: user.role, }); const session = await this.sessionsService.createSession( diff --git a/backend/src/common/interfaces/request.interface.ts b/backend/src/common/interfaces/request.interface.ts index 3232547..12d2207 100644 --- a/backend/src/common/interfaces/request.interface.ts +++ b/backend/src/common/interfaces/request.interface.ts @@ -4,5 +4,6 @@ export interface AuthenticatedRequest extends Request { user: { sub: string; username: string; + role: string; }; }