fedeya / next-auth-sanity

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

Upgrade to Auth.js version 5 #68

Open Adstokoe19 opened 5 months ago

Adstokoe19 commented 5 months ago

As you're probably aware, NextAuth.js is becoming Auth.js. Version 5 of Auth.js is a complete rewrite of the codebase and will introduce breaking changes, please refer to: https://authjs.dev/guides/upgrade-to-v5

V5 is currently in beta. It would be great to prepare your plugin in order to support this new version? Also, your plugin is earmarked as V2 (deprecated) in Sanity.io https://www.sanity.io/plugins/next-auth-sanity. I know it works fine with V3!

KennedyNvsf commented 5 months ago

Is there any news regarding the plugin upgrade to V5?

KennedyNvsf commented 4 months ago

I built my own sanity adapter to use with Nextauth V5. You may look into it if you want and give it a star if you find it helpful Repo

Adstokoe19 commented 4 months ago

I built my own sanity adapter to use with Nextauth V5. You may look into it if you want and give it a star if you find it helpful Repo

This is great! Have you considered publishing this to Sanity? Share your plugin

KennedyNvsf commented 4 months ago

To be honest i did not think about it but perhaps i might. I'd have to look into building a plugin/package and also maintaining it of course. If i do so, I will give you an update regarding it.

KennedyNvsf commented 4 months ago

Also, quick note: If you try the Authy Demo and create an account, you will not be able to confirm it because I am using the base Tier of Resend's package for email confirmation and it would only redirect confirmation emails to my own account. But if you clone the project and add your env variables after setting up resend, you should be able to do so. In production you'd have to add a domain into your resend's configuration to able to send emails to different accounts

that is if you want to include email confirmation/validartion