Add password fields and secure validation#48
Closed
rikardodlpj88 wants to merge 4 commits into
Closed
Conversation
✅ Deploy Preview for pharmatechadmin ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
gus211
approved these changes
May 18, 2025
gus211
requested changes
May 23, 2025
| @@ -125,7 +131,7 @@ export default function NewUserPage() { | |||
| const payload = { | |||
Contributor
There was a problem hiding this comment.
Agregaste los inputs de password y confirmPassword, lo validas y eso está bien, sin embargo, acá en el payload no estás enviando password entonces no tiene sentido.
Además, ya probé agregandolo y aparece el error property password should not exist porque el endpoint api.user.create(payload, token); NO espera password entonces en el backend hay que hacer ese fix.
Member
|
Se cierra el PR ya que por seguridad la contraseña se asignara de manera random desde el backend, enviandola por correo al usuario creado |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Password and Confirm Password inputs to the New User form.
Update Zod schema and safeParse call to include password and confirmPassword.
Enforce password complexity rules (min. 8 characters, uppercase, lowercase, number, special symbol) and verify both fields match, showing “Passwords do not match” on the confirm field.
Map and display validation errors for both password and confirmPassword.