-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
feat(adapter): remove adapters from core #1919
Conversation
BREAKING CHANGE: From now on, you will have to import your own adapter Check out https://github.com/nextauthjs/adapters
Whoa, this is more than awesome! I cannot wait to try it out very soon 🤩 Thank you for delivering all these improvements on a regular basis. Your contributions are invaluable to the Next.js ecosystem. |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nextauthjs/next-auth/3TYKRVLEfSpMerCHsqoroKmjhYED |
Conflicts: README.md package-lock.json package.json src/adapters/index.js src/adapters/prisma.js src/adapters/typeorm.js src/server/index.js types/adapters.d.ts www/docs/adapters/prisma-legacy.md www/docs/configuration/databases.md www/docs/schemas/adapters.md
81940bd
to
5ba814e
Compare
5ba814e
to
a4176c3
Compare
* feat(adapter): remove built-in adapters and database BREAKING CHANGE: From now on, you will have to import your own adapter Check out https://github.com/nextauthjs/adapters The migration is super easy and has HUGE advantages for those not using TypeORM. ```diff // [...nextauth].js + import TypeORMAdapter from "@next-auth/typeorm-legacy-adapter" import NextAuth from "next-auth" ... export default NextAuth({ - database: "yourconnectionstring", + adapter: TypeORMAdapter("yourconnectionstring") }) ``` Co-authored-by: Lluis Agusti <hi@llu.lu> Co-authored-by: Giovanni Carnel <479046+g10@users.noreply.github.com>
Reasoning 💡
After having tried a lot of options to make
typeorm
optional in the core, the best solution seems to be ... to remove it all together!All our adapters have their own packages now, and their development can be followed here: https://github.com/nextauthjs/adapters
Checklist 🧢
Feel free cross items ( like this
~[] item~
) if they're irrelevant to your changes.To check an item, place an
x
in the box like so:- [x] Documentation
.database
references, provide a migration toadapter
)Affected issues 🎟
#1673
BREAKING CHANGE:
From now on, you will have to import your own adapter
Check out https://github.com/nextauthjs/adapters
The migration is super easy and has HUGE advantages for those not using TypeORM.