diff --git a/packages/nocodb/src/controllers/auth/auth.controller.ts b/packages/nocodb/src/controllers/auth/auth.controller.ts index 6e315c39a5..3ab670fad1 100644 --- a/packages/nocodb/src/controllers/auth/auth.controller.ts +++ b/packages/nocodb/src/controllers/auth/auth.controller.ts @@ -89,7 +89,7 @@ export class AuthController { @Post('/api/v1/auth/user/signout') @HttpCode(200) async signOut(@Req() req: Request, @Res() res: Response): Promise { - if (!(req as any).isAuthenticated()) { + if (!(req as any).isAuthenticated?.()) { NcError.forbidden('Not allowed'); } res.json( @@ -137,7 +137,7 @@ export class AuthController { }) @HttpCode(200) async passwordChange(@Req() req: Request): Promise { - if (!(req as any).isAuthenticated()) { + if (!(req as any).isAuthenticated?.()) { NcError.forbidden('Not allowed'); }