add token expiry date to login response
This commit is contained in:
parent
5dd79374c1
commit
fac606cf97
3 changed files with 18 additions and 4 deletions
|
|
@ -32,13 +32,14 @@ export class AuthController {
|
|||
}
|
||||
|
||||
// Create JWT
|
||||
const token = encrypt.generateToken({
|
||||
const tokenInfo = encrypt.generateToken({
|
||||
id: user.id,
|
||||
});
|
||||
|
||||
const responseDto = new LoginResponseDto();
|
||||
responseDto.userData = this.mapper.toDto(user);
|
||||
responseDto.token = token;
|
||||
responseDto.token = tokenInfo.token;
|
||||
responseDto.expiryDate = tokenInfo.expiryDate;
|
||||
return responseDto;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue