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

I built a cloudflare D1 adapter, should the docs be for authjs or next-auth? #6948

Closed
jschlesser opened this issue Mar 15, 2023 · 1 comment
Labels
question Ask how to do something or how something works

Comments

@jschlesser
Copy link
Contributor

Question 💬

Hi 👋 ,
I built a database adapter for cloudflare D1. I feel like i'm close to ready for a PR. It passes the unit test suite in the adapter-test package. I have a demo app based on the svelte example & Cloudflare pages. It works locally. I have deployed it to cloudflare pages as well as a production test. Everything looks good so far. Basic login / logout with Github and database session strategy works fine. I'm guessing it needs docs before I open a PR. Should those docs reference next-auth or authjs ? For instance the supabase adapter starts off with: "This is the Supabase Adapter for next-auth. This package can only be used in conjunction with the primary next-auth package. It is not a standalone package." Should I emulate the supabase adapter documentation or some other adapter's docs? Should I write it for the future authjs adapter docs?

One note, the unit testing is reliant on @miniflare/d1 to mock the Cloudflare production d1. It had a subtle bug that made it not work when running in Jest, a native type e instanceof TypeError comparison that doesn't work when using the vm api. I submitted a PR and they accepted it and its merged to main but they haven't published to NPM yet. I have a version published at @jschlesser/d1 so that the adapter-test suite passes. I could alternatively use patch-package on @miniflare/d1 instead if that works better till they get around to running npm publish.

How should I proceed?

Thanks,
Josh

How to reproduce ☕️

There isn't anything to reproduce, it's just a question about how to proceed.

Contributing 🙌🏽

Yes, I am willing to help answer this question in a PR

@jschlesser jschlesser added the question Ask how to do something or how something works label Mar 15, 2023
@jschlesser
Copy link
Contributor Author

I've opened a PR on an old issue for a Cloudflare D1 Adapter.
#5918

I'm closing this so discussion can resume over there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Ask how to do something or how something works
Projects
None yet
Development

No branches or pull requests

1 participant