Skip to content

Conversation

@jcdogo
Copy link
Contributor

@jcdogo jcdogo commented Oct 7, 2022

This is an updated pull request of #3557 since it was closed due to inactivity. We also have the same use case as the original author (@Gregoor).

@ThangHuuVu I've updated the pull request against the latest main branch so that it compiles, and I have also addressed the requested changes from the original pull request:

  1. The allowDangerousEmailAccountLinking option was moved to OAuthConfig since it only applies to oauth providers.
  2. Added documentation for the new option in docs/configuration/providers/oauth.md

☕️ Reasoning

By default account linking can only be done through an active session, to prevent account stealing from low-trust providers. Some next-auth users might trust their chosen providers enough to opt them into more lax account linking.

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

#3557
#5098
#5324
#4826
#4625
#4271

@vercel
Copy link

vercel bot commented Oct 7, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
next-auth ⬜️ Ignored (Inspect) Oct 20, 2022 at 5:43PM (UTC)

@github-actions github-actions bot added core Refers to `@auth/core` providers labels Oct 7, 2022
@vercel vercel bot temporarily deployed to Preview October 7, 2022 02:01 Inactive
@balazsorban44
Copy link
Member

The original PR does not seem to be closed, but due to inactivity, it might be in the future. I closed it and pointed to this PR, hopefully, the author will understand.

@jcdogo jcdogo force-pushed the feature/opt-in-dangerous-account-linking branch from 3bf7bc6 to 885e01a Compare October 11, 2022 23:57
@vercel vercel bot temporarily deployed to Preview October 11, 2022 23:59 Inactive
@dogomedia-github
Copy link
Contributor

dogomedia-github commented Oct 12, 2022

We have rebased the PR so that there is no longer a conflict with main branch. Hopefully we can get this one approved since account linking seems to have come up fairly frequently.

Copy link
Member

@ThangHuuVu ThangHuuVu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sending the PR 🙌 Could you run the linter on the PR again? Let's get this merged soon

@jcdogo jcdogo force-pushed the feature/opt-in-dangerous-account-linking branch from 885e01a to 5e56e15 Compare October 20, 2022 17:29
@vercel vercel bot temporarily deployed to Preview October 20, 2022 17:32 Inactive
@jcdogo
Copy link
Contributor Author

jcdogo commented Oct 20, 2022

Thanks for sending the PR 🙌 Could you run the linter on the PR again? Let's get this merged soon

I'm are running into some difficulties running the linter! Not sure how to fix it as this is our first time working with mono repo. We're getting this error when running the linter.

error  Parsing error: File '@next-auth/tsconfig/tsconfig.base.json' not found

Any ideas how to resolve this? (I suspect we just haven't set up something correctly)

EDIT: Never mind. Instead of trying to build this locally, we just looked at the Github Actions pull request output and noticed that it was calling the lint command anyways. After rebasing the code onto main branch again, we noticed that there was a linting error that was breaking the build (not due to our changes though). So in order to complete the linting, we added a fix for the linting error. There should no longer be any outstanding issues with lint.

@jcdogo jcdogo requested review from ThangHuuVu and removed request for 0ubbe and ndom91 October 20, 2022 21:36
Copy link
Member

@ThangHuuVu ThangHuuVu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Refers to `@auth/core` providers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants