topcoder-platform / community-app

React webapp for serving Topcoder Community
125 stars 212 forks source link

Error with changing account email #5106

Open Oanh-and-only-Oanh opened 4 years ago

Oanh-and-only-Oanh commented 4 years ago

How to reproduce:

  1. As a logged in user, go to: https://www.topcoder.com/settings/account
  2. Click on Change Email button
  3. Enter in new email address (must be different from current email address)
  4. Click on Send Validation Email button 5.Error message appears. See screenshot image

Expected behavior:

  1. As a logged in user, go to: https://www.topcoder.com/settings/account
  2. Click on Change Email button
  3. Enter in new email address (must be different from current email address)
  4. Click on Send Validation Email button
  5. Message should appear saying "Your email has been updated. A Validation email has been sent to <<>>
  6. New email CANNOT match current EMAIL. Error message will appear saying "Your new email address cannot be your current email address. Please use a different email."

Testing/Validation 1) New email CANNOT match current EMAIL. Error message will appear saying "Your new email address cannot be your current email address. Please use a different email." 2) Make sure a validation email is sent to the new email address 3) Make sure member can log in using new email address and correct password 4) New email CANNOT be associated with an existing TC account

Scope: "Change Email" functionality is NOT allowed for SSO users such as Topgear, zurich, Credit Suisse, or social media log-ins

maxceem commented 4 years ago

@Oanh-and-only-Oanh I've debugged this issue on production using user credentials you've provided.

This doesn't look like a Community App issue. It looks like the issue is with Topcoder Member Service or Topcoder Gateway config. In some reason request https://api.topcoder.com/v3/members/ladybosss?verifyUrl=http://www.topcoder.com/settings/account/changeEmail is not allowed from domain https://www.topcoder.com by CORS policy:

image

maxceem commented 4 years ago

Btw, this issue is not reproducible in the Development environment I can successfully change email at https://www.topcoder-dev.com/settings/account.

Oanh-and-only-Oanh commented 3 years ago

from @urwithat: The verify url is passed from the community-app to member api, we see from the error of CORS this is the request sent: https://api.topcoder.com/v3/members/ladybosss?verifyUrl=http://www.topcoder.com/settings/account/changeEmail the verify url is verifyUrl=http://www.topcoder.com/settings/account/changeEmail its http, should be https Should just be www.topcoder.com/settings/account/changeEmail image

There's an issue in ES while its validating the email address for the member v3, you can go ahead and start using the member v5.