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

🚀 Feature: Re-hash Password on Phone Update #4990

Closed
2 tasks done
stnguyen90 opened this issue Jan 11, 2023 · 7 comments · Fixed by #5621
Closed
2 tasks done

🚀 Feature: Re-hash Password on Phone Update #4990

stnguyen90 opened this issue Jan 11, 2023 · 7 comments · Fixed by #5621
Assignees
Labels
product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services.
Milestone

Comments

@stnguyen90
Copy link
Contributor

🔖 Feature description

Users can be imported with a different password hash, but they should be re-hashed to the default algorithm. This is done for the update email API call:

->setAttribute('password', $isAnonymousUser ? Auth::passwordHash($password, Auth::DEFAULT_ALGO, Auth::DEFAULT_ALGO_OPTIONS) : $user->getAttribute('password', ''))

but not for the update phone API call.

🎤 Pitch

Update the update phone API call to make sure it's consistent with update email.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@stnguyen90 stnguyen90 added product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services. feature labels Jan 11, 2023
@harshmange44
Copy link

@stnguyen90 I'd like to contribute to this feature.

@stnguyen90
Copy link
Contributor Author

@harshmange44 assigned! thanks for your interest! 🙏🏼

@harsh020
Copy link

@stnguyen90, I would also be interested in working on this.

If I understand this correctly, you want the updatePhone api to re-hash the password if the user is anonymous. Am I right?

@stnguyen90
Copy link
Contributor Author

@stnguyen90, I would also be interested in working on this.

@harsh020, thanks! 🙏🏼 However, this has already been assigned to @harshmange44 and it's enough to have 1 person working on this.

If I understand this correctly, you want the updatePhone api to re-hash the password if the user is anonymous. Am I right?

Yes, the logic should be the same as the updateEmail API.

@harshmange44
Copy link

harshmange44 commented Jan 13, 2023

@stnguyen90 I've raised a PR: ##5003

@abhishek818
Copy link

@stnguyen90 @Meldiron can i pick up this issue , have a MR --> #5269

@stnguyen90 stnguyen90 removed this from the 1.3.0 milestone Apr 25, 2023
@stnguyen90 stnguyen90 self-assigned this Apr 25, 2023
@stnguyen90
Copy link
Contributor Author

Sorry, looks like we're going to change the behavior a bit.

  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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services.
Projects
None yet
4 participants