expiry time is not calculated correctly for access tokens

Open
#21 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript

Research direction

Start by locating the access-token expiry calculation and inspect how exp is compared with JavaScript Date values. Verify expiresIn, expiresAt, and expired using exp in seconds rather than milliseconds. Done means those three values are calculated correctly for access tokens.

Written by the indexing model from the issue text.

Description

The values such as expiresIn (and expiresAt) as well as the expired boolean are not being calculated correctly

The exp should be provided in seconds, though the date comparison is using the java date in milliseconds (not divided by 1000)

Dominant language
TypeScript
Stars
19
Forks
1
Avg merge
1m
Merged PRs (30d)
8

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from edgefirst-dev/jwt

All issues in edgefirst-dev/jwt

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.