Node.js - Jsonwebtoken Calculate "iat" and "exp"
<p>I'm setting up an API in Node.js and Express and I use JWT for authentication, which works really nice. The one thing I have not been able to figure out is how determine the exact date and time which associated with the IAT value. I know it's based on milliseconds, but I cannot relate this back to a date. The official JWT specification says:(<a href="https://www.rfc-editor.org/rfc/rfc7519#page-10" rel="nofollow noreferrer">https://www.rfc-editor.org/rfc/rfc7519#page-10</a>)</p>
<blockquote>
<p>4.1.6.  &quot;iat&quot; (Issued At) Claim
The &quot;iat&quot; (issued at) claim identifies the time at which the JWT was
issued.  This claim can be used to determine the age of the JWT.  Its
value MUST be a number containing a NumericDate value.  Use of this
claim is OPTIONAL.</p>
</blockquote>
<p>For example:</p>
<pre><code>&quot;iat&quot;: 1479203274,
&quot;exp&quot;: 1479205074,
</code></pre>
<p>Any ideas?</p>
<p>Thanks!</p>