Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
4 of 6 tasks
olleolleolle opened this issue Mar 30, 2021 · 2 comments
Closed
4 of 6 tasks
Labels
type:feature New feature or improvement of existing feature

Comments

@olleolleolle
Copy link
Contributor

olleolleolle commented Mar 30, 2021

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.

  • 🤩 I submitted a PR with a fix and a test case.
  • 🧐 I submitted a PR with a failing test case.

Environment

Server

  • Parse Server version: 4.5.0
  • Operating system: Linux
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): local

Database

  • System (MongoDB or Postgres): mongo
  • Database version: idk
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): local

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): javascript
  • SDK version: idk

Logs

(No logs.)

@mtrezza
Copy link
Member

mtrezza commented Mar 30, 2021

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?

@mtrezza mtrezza added type:feature New feature or improvement of existing feature and removed type:improvement labels Dec 6, 2021
@dplewis
Copy link
Member

dplewis commented Jul 17, 2024

Closing as jwks-rsa 3.1.0 is currently used

@dplewis dplewis closed this as completed Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

3 participants