Custom Database - Login script - PostgreSQL template dependency

Hi

I noticed a possible problem with the Custom Database script templates, especially the Login one with PostgreSQL

By default it requires the package pg, which seems to be in a deprecated version.

I adapted the template for my use-case, which requires to hit the Heroku API in a first place in order to retrieve the DB URL of my PostgreSQL.
Then, connect to PostgreSQL through the pg library.

Through the weeks, it works well.
Then, I encountered errors on the connection (without no changes on the login script), which I was able to fix by only bumping the pg version. It feels like the pg library imported by the template simply does not work well, and is deprecated.

An update on that matter had been made recently on the Auth0 side?

I was able to find which packages are allowed to be imported in those scripts with this link:
Can I require? - Search which node modules you can use in webtask.io

Is it relevant/official?
- If yes, I did not find this on the documentation: did I search wrong?
- If not, can someone redirect me to an official resource that I can’t find?

My point is:

It feels that the templates are way too old, and the packages imported by default are mostly deprecated (thing that we can’t see, only guess), and could lead to error.

I would be a good plus to have the Custom Database scripts part more documented, especially when it comes to the dependencies (what version are imported, what we can use…)

1 Like