Skip to content

Update password for users having password (for Update Phone/Email APIs) - #5269

Closed
abhishek818 wants to merge 1 commit into
appwrite:masterfrom
abhishek818:akg/feat-4990-update-password-if-users-provide-password-update-phone-api
Closed

abhishek818 wants to merge 1 commit into
appwrite:masterfrom
abhishek818:akg/feat-4990-update-password-if-users-provide-password-update-phone-api

Conversation

@abhishek818

Copy link
Copy Markdown

What does this PR do?

  1. We don't want to update the password for users without a password
  2. We don't want to verify the password if the user doesn't have a password

Test Plan

Related PRs and Issues

4990, 4975

Checklist

  • Have you read the Contributing Guidelines on issues?
  • [] If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

@abhishek818 abhishek818 changed the title Update password for users having password (for Update Phone API) Update password for users having password (for Update Phone/Email APIs) Mar 24, 2023
@stnguyen90
stnguyen90 self-requested a review May 25, 2023 12:58

@stnguyen90 stnguyen90 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for your PR! 🙏🏼 Unfortunately, the change won't work in all cases. Also, we've decided to take this on internally so we won't need a PR anymore.


if (
!$isAnonymousUser &&
!empty($user->getAttribute('password')) &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unfortunately, this won't work because we actually set a random password for users if they sign in using OAuth2.

@stnguyen90 stnguyen90 closed this May 25, 2023
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.

3 participants