Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
feat: hide twoFactorSecret
Browse files Browse the repository at this point in the history
  • Loading branch information
YanceyOfficial committed Mar 27, 2020
1 parent 8c7e302 commit 1a062b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class AuthService {
}

private generateJWT(email: string, res: User) {
const { password, ...rest } = res.toObject()
const { password, twoFactorSecret, ...rest } = res.toObject() as User
const payload = { email, sub: res._id }
return { authorization: this.jwtService.sign(payload), ...rest }
}
Expand Down

0 comments on commit 1a062b4

Please sign in to comment.