IdentityServer4 icon indicating copy to clipboard operation
IdentityServer4 copied to clipboard

Consider removing nbf claim

Open openidauthority opened this issue 8 years ago • 2 comments

The nbf (not before) claim has a useful purpose to prevent a jwt from being used until some time in the future. However, it does not appear to add any value to set it to the time the token is created. We already have that time recorded in the iat claim, and of course the token cant be used before it is even issued.

Including the nbf claim comes with a negative side effect: some libraries that validate jwts don't take into account clock drift of a few seconds or minutes, and unnecessarily reject the jwt.

So unless it has some positive purpose, it should be remove to avoid the negative side effect.

openidauthority avatar May 26 '18 00:05 openidauthority

On further investigation, the issue appears to be with a client library rejecting the jwt based on the iat claim being in the future (due to skew) not the presence of a nbf claim.

openidauthority avatar May 28 '18 21:05 openidauthority

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 13 '20 09:01 lock[bot]