mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Merge pull request #783 from Human-Connection/remove_unnecessary_dependency_ms
Replace dependency `ms` completely
This commit is contained in:
commit
a0f9e90ce2
@ -69,7 +69,6 @@
|
||||
"linkifyjs": "~2.1.8",
|
||||
"lodash": "~4.17.11",
|
||||
"merge-graphql-schemas": "^1.5.8",
|
||||
"ms": "~2.1.1",
|
||||
"neo4j-driver": "~1.7.4",
|
||||
"neo4j-graphql-js": "git+https://github.com/Human-Connection/neo4j-graphql-js.git#temporary_fixes",
|
||||
"node-fetch": "~2.6.0",
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
import jwt from 'jsonwebtoken'
|
||||
import ms from 'ms'
|
||||
import CONFIG from './../config'
|
||||
|
||||
// Generate an Access Token for the given User ID
|
||||
export default function encode(user) {
|
||||
const token = jwt.sign(user, CONFIG.JWT_SECRET, {
|
||||
expiresIn: ms('1d'),
|
||||
expiresIn: 24 * 60 * 60 * 1000, // one day
|
||||
issuer: CONFIG.GRAPHQL_URI,
|
||||
audience: CONFIG.CLIENT_URI,
|
||||
subject: user.id.toString(),
|
||||
|
||||
@ -5522,7 +5522,7 @@ ms@2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
||||
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
|
||||
|
||||
ms@2.1.1, ms@^2.1.1, ms@~2.1.1:
|
||||
ms@2.1.1, ms@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
|
||||
integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user