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: support advanced initialization in v5 #9638
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Co-authored-by: Balázs Orbán <info@balazsorban.com>
Is there any way lazy initialisation can be executed asynchronously? I need to make async calls to obtain the Id's and secrets for the providers. I could do this using v4, but seems like there's no support in v5 beta (so far)? |
@chrisivo what do you mean exactly? The first argument to export const { auth, signIn, signOut } = NextAuth({
providers: [ ... ],
debug: true
}) But yuo can also do this: export const { auth, signIn, signOut } = NextAuth(async (req) => {
return {
providers: [ ... ],
debug: true
}
)) EDIT: Sorry, just double checked and this seems to only be the case for the SvelteKit client. |
Thanks for the response @ndom91. Is there any roadmap at all for introducing asynchronous functions when initialising in |
☕️ Reasoning
Add support for advanced initialization for v5.
🧢 Checklist
🎫 Affected issues
Fixes: #9455
📌 Resources