Skip to content

fix: remove ignored assignment#1583

Merged
YasharF merged 1 commit intosahat:masterfrom
YasharF:provider_emails
Mar 23, 2026
Merged

fix: remove ignored assignment#1583
YasharF merged 1 commit intosahat:masterfrom
YasharF:provider_emails

Conversation

@YasharF
Copy link
Copy Markdown
Collaborator

@YasharF YasharF commented Mar 23, 2026

The User schema doesn't define profile.email, so Mongoose ignores it in strict mode. The email field is populated at account creation (it is required), so this line is unnecessary.

Checklist

  • I acknowledge that submissions that include copy-paste of AI-generated content taken at face value (PR text, code, commit message, documentation, etc.) most likely have errors and hence will be rejected entirely and marked as spam or invalid
  • I manually tested the change with a running instance, DB, and valid API keys where applicable
  • [] Added/updated tests if the existing tests do not cover this change
  • README or other relevant docs are updated
  • --no-verify was not used for the commit(s)
  • npm run lint passed locally without any errors
  • npm test passed locally without any errors
  • npm run test:e2e:replay passed locally without any errors
  • npm run test:e2e:custom -- --project=chromium-nokey-live passed locally without any errors
  • PR diff does not include unrelated changes
  • PR title follows Conventional Commits — https://www.conventionalcommits.org/en

Description

Screenshots of UI changes (browser) and logs/test results (console, terminal, shell, cmd)

Copilot AI review requested due to automatic review settings March 23, 2026 08:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes an ignored Mongoose assignment in the OAuth account-linking flow to avoid writing to an undefined User.profile.email field (which is discarded under strict schemas).

Changes:

  • Remove user.profile.email assignment when linking an OAuth provider to an already-logged-in user.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The User schema doesn't define profile.email, so Mongoose ignores it in strict mode. The email field is populated at account creation (it is required), so this line is unnecessary.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@YasharF YasharF merged commit e54527c into sahat:master Mar 23, 2026
6 checks passed
@YasharF YasharF deleted the provider_emails branch March 23, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants