fedeya / next-auth-sanity

NextAuth Adapter and Provider for Sanity
https://sanity.io/plugins/next-auth-sanity
MIT License
78 stars 20 forks source link

Moving under the official organization? #3

Closed balazsorban44 closed 2 years ago

balazsorban44 commented 3 years ago

Hi there!

I am one of the maintainers of https://github.com/nextauthjs and I am writing to you because I saw that you created this custom adapter for NextAuth.js.

We have created a home for community adapters here: https://github.com/nextauthjs/adapters

Are you interested in moving your package under @next-auth/sanity-adapter so others can discover it much easier?

You will get full maintainership of the package if you wish, and I can provide you all the help necessary to migrate your code into the repository. We will take care of releases and bundling and all that stuff for you.

Looking forward to hearing from you!

fedeya commented 3 years ago

Hello @balazsorban44, the idea of moving it to the community repository seems great, I had seen it but I needed to launch this package quickly and I did not want to wait for times when the pr will be accepted, etc.

If you can provide me with the documentation or something to be able to migrate it to the next auth repo it would be helpful.

Thanks.

fedeya commented 3 years ago

@balazsorban44 Sorry I just remembered, this module, in addition to an adapter, also returns methods for authentication with credentials, is it still correct to send it to the adapters?

balazsorban44 commented 3 years ago

Thanks for the quick reply!

Ah, I see! The adapters repo is meant for only adapters, so you could extract only that and redistribute it through our organization, while you could keep everything else separate.

What you would need to do is create a PR in which you move your code to a folder called sanity here:

https://github.com/nextauthjs/adapters/tree/canary/packages

You can have a look at the prisma adapter to get a good idea of how an adapter is structured.

We are still working out some small parts, but once you create a PR, I think we will be able to get a release out at worst case in 1 or 2 days. πŸ™‚ If that sound good, let me know!

If you are on Twitter, I have the same name there, ping me and we can talk if you need more help with the migration! ☺️

balazsorban44 commented 3 years ago

After looking at your source code again, the adapter.ts, client.ts and queries.ts files all fit well in our repository and we could help with the maintenance of that for you! Have you been able thought about it yet? 😊

Also, for your interest, we recently added a better TS support for Adapters: https://next-auth.js.org/getting-started/typescript#adapters