Skip to content
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

replace .flat() to support Node <11 in handleSignin #1691

Merged
merged 1 commit into from Apr 11, 2021

Conversation

fxamauri
Copy link
Contributor

@fxamauri fxamauri commented Apr 11, 2021

What:
Fix .flat is not a function in handlesignIn when running node version lower than 11

Why:
This problem started in #1565, I made a change recently (PR #1684), but I ended up forgetting to change the old function

How:
A check was made to check if the provider.protection is a string and if this is true, the provider.protection is rewritten to array and the string is placed inside and the handlers were edited again adjusted

Checklist:

  • Documentation
  • Tests
  • Ready to be merged

Fixes #1675

@vercel
Copy link

vercel bot commented Apr 11, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nextauthjs/next-auth/6XcPXddvnXVEdAvxMnYqsm3qLMt6
✅ Preview: https://next-auth-git-fork-fxamauri-fix-flat-is-not-a-funct-3df8b8.vercel.app

@vercel vercel bot temporarily deployed to Preview April 11, 2021 21:09 Inactive
@github-actions github-actions bot added the core Refers to `@auth/core` label Apr 11, 2021
@balazsorban44 balazsorban44 merged commit d1dbfe1 into nextauthjs:main Apr 11, 2021
@github-actions
Copy link

🎉 This PR is included in version 3.14.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 4.0.0-next.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Refers to `@auth/core`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v3.14.0 bug: TypeError: [provider.protection].flat is not a function
2 participants