Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
🐛 Wait for token to be invalidated
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Mar 5, 2020
1 parent f26f301 commit c87df8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@staart/api",
"version": "1.3.115",
"version": "1.3.116",
"main": "index.js",
"repository": "[email protected]:staart/api.git",
"author": "Anand Chowdhary <[email protected]>",
Expand Down Expand Up @@ -90,5 +90,5 @@
"setup"
],
"snyk": true,
"staart-version": "1.3.115"
"staart-version": "1.3.116"
}
2 changes: 1 addition & 1 deletion src/helpers/jwt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export const invalidateToken = async (token: string) => {
if (!redis) return;
const details = decode(token);
if (details && typeof details === "object" && details.jti)
redis.set(
await redis.set(
`${JWT_ISSUER}-revoke-${details.sub}-${details.jti}`,
"1",
details.exp && [
Expand Down

0 comments on commit c87df8c

Please sign in to comment.