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: simplify NextAuth instantiation #867
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nextauthjs/next-auth/48kcjhjdf |
This reverts commit b86ffa5.
Great change! Typings should be updated accordingly in the DefinitelyTyped project, so TypeScript users may also benefit from this change. |
🎉 This PR is included in version 3.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
We could simplify the
NextAuth
instance even further, by checking the number of arguments. If there is only one argument, the default function inserver/index.js
could return aNextApiHandler
. Otherwise preserve the current behaviour, for backwards compatibility.Fixes #868