Skip to content

Commit 871e4c5

Browse files
committed
Use jwks-rsa 2.0.2, with async/await support
This pushes up to declare Node 10+ as a requirement, but we were using that in practice, before, too. jwks-rsa CHANGELOG mentions this upgrade guide: https://github.com/auth0/node-jwks-rsa/blob/master/CHANGELOG.md#migrated-callbacks-to-asyncawait
1 parent a080e4c commit 871e4c5

File tree

5 files changed

+26
-68
lines changed

5 files changed

+26
-68
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ ___
119119
- LDAP: Properly unbind client on group search error (Diamond Lewis) [#7265](https://github.com/parse-community/parse-server/pull/7265)
120120
- Improve data consistency in Push and Job Status update (Diamond Lewis) [#7267](https://github.com/parse-community/parse-server/pull/7267)
121121
- Excluding keys that have trailing edges.node when performing GraphQL resolver (Chris Bland) [#7273](https://github.com/parse-community/parse-server/pull/7273)
122+
- Use jwks-rsa 2.x (Olle Jonsson) [#7305](https://github.com/parse-community/parse-server/pull/7305)
122123
___
123124
## 4.5.0
124125
[Full Changelog](https://github.com/parse-community/parse-server/compare/4.4.0...4.5.0)

package-lock.json

Lines changed: 21 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"graphql-upload": "11.0.0",
4343
"intersect": "1.0.1",
4444
"jsonwebtoken": "8.5.1",
45-
"jwks-rsa": "1.12.3",
45+
"jwks-rsa": "2.0.2",
4646
"ldapjs": "2.2.4",
4747
"lodash": "4.17.21",
4848
"lru-cache": "5.1.1",
@@ -125,7 +125,7 @@
125125
"postinstall": "node -p 'require(\"./postinstall.js\")()'"
126126
},
127127
"engines": {
128-
"node": ">= 8"
128+
"node": ">= 10"
129129
},
130130
"bin": {
131131
"parse-server": "bin/parse-server"

src/Adapters/Auth/apple.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ const getAppleKeyByKeyId = async (keyId, cacheMaxEntries, cacheMaxAge) => {
1616
cacheMaxAge,
1717
});
1818

19-
const asyncGetSigningKeyFunction = util.promisify(client.getSigningKey);
20-
2119
let key;
2220
try {
23-
key = await asyncGetSigningKeyFunction(keyId);
21+
key = await client.getSigningKey(keyId);
2422
} catch (error) {
2523
throw new Parse.Error(
2624
Parse.Error.OBJECT_NOT_FOUND,

src/Adapters/Auth/facebook.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,9 @@ const getFacebookKeyByKeyId = async (keyId, cacheMaxEntries, cacheMaxAge) => {
5858
cacheMaxAge,
5959
});
6060

61-
const asyncGetSigningKeyFunction = util.promisify(client.getSigningKey);
62-
6361
let key;
6462
try {
65-
key = await asyncGetSigningKeyFunction(keyId);
63+
key = await client.getSigningKey(keyId);
6664
} catch (error) {
6765
throw new Parse.Error(
6866
Parse.Error.OBJECT_NOT_FOUND,

0 commit comments

Comments
 (0)