feat(adapter): add `postgres.js` adapter
☕️ Reasoning
Adding a postgres.js database adapter.
🧢 Checklist
- [x] Documentation
- [x] Tests
- [x] Ready to be merged
🎫 Affected issues
📌 Resources
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| auth-docs | ❌ Failed (Inspect) | Apr 12, 2024 11:04pm |
1 Ignored Deployment
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| next-auth-docs | ⬜️ Ignored (Inspect) | Visit Preview | Apr 12, 2024 11:04pm |
What's the difference between this as the pg-based adapter (@auth/pg-adapter)?
This uses postgres.js instead of node-postgres.
This uses postgres.js instead of node-postgres.
Right, but what's the advantage of one over the other?
There's another PR adding an adapter which uses postgres.js (see: https://github.com/nextauthjs/next-auth/pull/11200), we'd love it if you two could sync and just put up 1 high(er) quality PR :pray:
My PR was a pretty quick hack with plenty of TS-related errors. It's probably best to go with their PR.