next-auth
next-auth copied to clipboard
feat(adapters): add Xata adapter
This PR adds a next-auth adapter for Xata, a new database. Xata is currently private beta, but we're already using it internally with next-auth and we'd love to contribute this to the source for our early access users and for our own internal dogfooding.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
| Name | Status | Preview | Updated |
|---|---|---|---|
| next-auth | ⬜️ Ignored (Inspect) | Oct 27, 2022 at 10:06AM (UTC) |
Hey y'all, Xata is currently closed beta, but we'd love to have this added here because we'd like to use it internally, and we can only do that if it's published to the npm registry. 😬
Can we do this?
So here's a Loom about how this works:
https://www.loom.com/share/6ab4792d5f45468ea355c9b8ae904388
Some notes that came out of this:
- I will update the docs to follow this flow more closely,
- About automated integration tests, we could maybe create a sample database to use for this. Do you think that's a good idea? Or do you have a better one in mind?
Thanks, I'll have a look. Yeah, I think creating a sample database for testing would be nice. We can use environment variables from the GitHub Actions, similarly to the Upstash adapter:
https://github.com/nextauthjs/next-auth/blob/70ffa6592fb490c224bde41db2257fdb63af34b7/packages/adapter-upstash-redis/tests/index.test.ts#L6-L14
Compared to locally runnable (i.e. Docker or similar) databases, the only downside is that these environment variables won't be shared with fork PRs, but once we ironed out the details, we might not expect many changes to the adapter code, and I can run tests on my branches or locally anyway, so it should be good. :+1: Anyone else could create their own test database for local testing.
Awesome! I'll get cracking on the tests. 😬
Just remembered, could you add the adapter to these lists:
For auto-labeling issues: https://github.com/nextauthjs/next-auth/blob/main/.github/issue-labeler.yml https://github.com/nextauthjs/next-auth/blame/main/.github/ISSUE_TEMPLATE/3_bug_adapter.yml#L23-L34
For auto-labeling PRs https://github.com/nextauthjs/next-auth/blob/main/.github/pr-labeler.yml
Just remembered, could you add the adapter to these lists:
For auto-labeling issues: https://github.com/nextauthjs/next-auth/blob/main/.github/issue-labeler.yml https://github.com/nextauthjs/next-auth/blame/main/.github/ISSUE_TEMPLATE/3_bug_adapter.yml#L23-L34
For auto-labeling PRs https://github.com/nextauthjs/next-auth/blob/main/.github/pr-labeler.yml
Done in https://github.com/nextauthjs/next-auth/pull/4911/commits/352a40ed45dbc89efd7e51809418c6e9b5b40a30!
Okay! I've added tests and everything else required. This LGTM to me so far. Did I miss anything? 🤩
I’m noticing a couple of checks are still pending. Is this something I can fix? 🧐
I would love to see this happen, hoping to use it on stream Thursday 🙏
@ThangHuuVu, @balazsorban44, done! 🙌
Thanks Mr. Advantageous @TejasQ 🙌😆 I will do a release shortly for the new package and some other changes
Do we know when the release will be? Trying to plan out some streams.