@Post('api/auth/sso/saml/ac') @UseGuards(SamlAuthGuard) async samlAssertionConsumer( @Request() req: express.Request, @Response() res: express.Response, ) { //this routes gets executed on successful assertion from IdP if (req.user) { const user = req.user as User; const jwt = this.authService.getTokenForUser(user); this.userService.storeUser(user); this, res.redirect('/?jwt=' + jwt); } }