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

fix: DefaultAdapter.updateUser id parameter is guaranteed to be present #7027

Closed
wants to merge 2 commits into from
Closed

fix: DefaultAdapter.updateUser id parameter is guaranteed to be present #7027

wants to merge 2 commits into from

Conversation

ari-becker
Copy link

@ari-becker ari-becker commented Mar 22, 2023

The updateUser method's type signature now guarantees that the id parameter will be present. This will fix an issue when trying to write a new adapter that refuses to run an update operation on a user if it's possible that the user does not exist.

NOTE:

  • It's a good idea to open an issue first to discuss potential changes.
  • Please make sure that you are NOT opening a PR to fix a potential security vulnerability. Instead, please follow the Security guidelines to disclose the issue to us confidentially.

☕️ Reasoning

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Please scout and link issues that might be solved by this PR.

Fixes: INSERT_ISSUE_LINK_HERE

📌 Resources

The updateUser method's type signature now guarantees that the `id` parameter will be
present. This will fix an issue when trying to write a new adapter that refuses to run
an update operation on a user if it's possible that the user does not exist.
@vercel
Copy link

vercel bot commented Mar 22, 2023

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

Name Status Preview Comments Updated
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 22, 2023 at 4:44PM (UTC)
auth-docs-nextra ❌ Failed (Inspect) Mar 22, 2023 at 4:44PM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
next-auth-docs ⬜️ Ignored (Inspect) Mar 22, 2023 at 4:44PM (UTC)

@balazsorban44 balazsorban44 self-requested a review March 29, 2023 12:15
@balazsorban44 balazsorban44 changed the base branch from main to v4 March 29, 2023 12:15
@balazsorban44 balazsorban44 changed the base branch from v4 to main March 29, 2023 12:15
balazsorban44 added a commit that referenced this pull request Mar 29, 2023
@balazsorban44
Copy link
Member

Closed by 319f2ce

The PR was opened against the wrong branch. Thanks though!

@ari-becker ari-becker deleted the fix-adapter-update-user-type branch March 30, 2023 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy Refers to `next-auth` v4. Minimal maintenance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants