Skip to content

Verification Emails are triggered every time User.current is saved #239

@dblythy

Description

@dblythy

New Issue Checklist

Issue Description

Parse Swift triggers email verification whenever User.current?.save is called.

Steps to reproduce

  1. Turn verifyUserEmails on.
  2. Update any field on User.current
  3. Check emails

Actual Outcome

Emails are sent every time user is updated

Expected Outcome

Emails to only send on signup, or email update, as per the SDK.

Specifically, the issue seems to be related to here o the server:

RestWrite.prototype._validateEmail = function () {
 if (!this.data.email || this.data.email.__op === 'Delete') {
    return Promise.resolve();
  } 

For the JS SDK, this.data.email is undefined on any update. For Parse Swift calls, this.data.email is passed.

Environment

Client

  • Parse Swift SDK version: 1.9.10
  • Xcode version: 10.15.7
  • Operating system (iOS, macOS, watchOS, etc.): iOS
  • Operating system version: 14.3

Server

  • Parse Server version: Master (around 4.5.0
  • Operating system: macOS
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): local

Database

  • System (MongoDB or Postgres): mongoDB
  • Database version: 4.4
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): Atlas

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions