You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 9, 2021. It is now read-only.
Hello
The documentation is not very clear when it comes to my understanding of the following.
Consider a JWT token is created in nodejs:
token() {
const payload= {
exp: moment()
.add(jwtExpirationInterval, "minutes")
.unix(),
iat: moment().unix(),
sub: this._id
};
return nJwt.create(playload, jwtSecret,"HS256").compact();
},
Now, without the "jwtSecret", I am able to see the "payload";
So, there is something wrong in my encoding, right? OR Is the secret key used ONLY to verify the payload?
many thanks