parse-community / parse-server

Parse Server for Node.js / Express
https://parseplatform.org
Apache License 2.0
20.93k stars 4.78k forks source link

Use jwks-rsa 2.x to get their async/await methods, for simpler code #7304

Closed olleolleolle closed 3 months ago

olleolleolle commented 3 years ago

New Issue Checklist

Issue Description

👋 Hello, I hope this "this is a hunch for avoiding some complexity" Issue sits in the right place.

The dependency jwks-rsa has a new interface: its client methods are now no longer callbacks but directly awaitable things. We no longer need to use promisify() around them.

Using this new 2.x version would simplify our code.

Upgrade guide (this is the one thing in the guide which impacts us): https://github.com/auth0/node-jwks-rsa/blob/master/CHANGELOG.md#migrated-callbacks-to-asyncawait

New Requirement: Node 10+.

I can see in package.json that 8+ is in our "engines". Can that be bumped?

Locations in our code where used: facebook, apple auth adapters.

Steps to reproduce

Well, one can try installing parse-server with yarn and there are notes about

Actual Outcome

Um, existing code.

Expected Outcome

It would be simpler code to use the new API. Also, they dropped the Axios dep.

Failing Test Case / Pull Request

Sorry, no test case.

Environment

Server

Database

Client

Logs

(No logs.)

mtrezza commented 3 years ago

Thanks for suggesting.

Parse Server is officially compatible and tested with Node >=10, so bumping the engine version to >=10 should be fine.

Would you want to start a PR?

dplewis commented 3 months ago

Closing as jwks-rsa 3.1.0 is currently used