set cookie using nest js

Solutions on MaxInterview for set cookie using nest js by the best coders in the world

showing results for - "set cookie using nest js"
Tim
24 Feb 2020
1async login(@Body('username') username: string, @Body('password') password: string, @Res() res: Response) {
2    const token = await this.authService.validateUser(username, password);
3    res.set('Authorization', 'Bearer ' + token);
4    res.send({
5        success: true,
6        token,
7    })
8});
9