Closed rjtbansal closed 4 years ago
OK, good to know. I was not familiar with that syntax.
Also re the token you shared. Thanks. I did not physically test it.
On Thu, May 21, 2020 at 3:05 PM Rajat Bansal notifications@github.com wrote:
@rjtbansal commented on this pull request.
In server/routes/user.js https://github.com/hatchways/team-penguin/pull/29#discussion_r428941661:
- jwt.sign(payload, secretKey["secretOrKey"], {
- expiresIn: 86400 //expires in 1 day
- },
- (err, token) => {
unclear where token is coming from (definition). should a var be created for the result of jwt.sign() and if so, should the , in line 61 be ;?
This is an async way of generating token. Take a look at jsonwebtoken npm doc: https://www.npmjs.com/package/jsonwebtoken Jump to the section called 'Sign asynchronously'
— You are receiving this because your review was requested. Reply to this email directly, view it on GitHub https://github.com/hatchways/team-penguin/pull/29#discussion_r428941661, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEI72ATISH5MRI3XOUZHH3RSWQS5ANCNFSM4NG4KRMQ .
Issue #9