Skip to content

Conversation

@Serafeim-Katsaros
Copy link

@Serafeim-Katsaros Serafeim-Katsaros commented Nov 4, 2025

Description

  • Adds a “Generate Password” button to the signup form.
    The password is now generated fully client-side using the Web Crypto API (crypto.getRandomValues) without any backend code or AJAX requests.
  • Adds a professional show/hide toggle next to the first password input field, allowing users to reveal or hide the password.

Why this PR is needed:

  • Improves user experience by allowing users to generate strong passwords without typing them manually.
  • Makes the password field more user-friendly with a professional show/hide toggle.
  • Ensures proper multilingual support for all new UI elements.

Generate Password Details:

  • The password is generated entirely on the client-side using the Web Crypto API (crypto.getRandomValues()), which produces cryptographically secure random numbers.
  • Each character is randomly selected from a charset containing uppercase letters, lowercase letters, digits, and symbols.
  • Default password length is 20 characters.
  • This method ensures that the generated password is strong and unpredictable, suitable for secure authentication.

Screenshots:

Screenshot_2025-11-04_12-03-25 Screenshot_2025-11-04_12-06-12

Notes:

  • This PR does not affect existing login or signup functionality.
  • The UI elements are consistent with the existing Bootstrap styling in the project.

@egorsmkv
Copy link
Owner

egorsmkv commented Nov 5, 2025

@Serafeim-Katsaros I think, it's better to generate a password using JS instead of Python

@Serafeim-Katsaros
Copy link
Author

@Serafeim-Katsaros I think, it's better to generate a password using JS instead of Python

Thank you for your feedback. I completely understand your point --- generating the password directly in JavaScript would simplify the process and remove the need for an extra backend request. I can update the implementation so the random code is generated client-side using Web Crypto API for security. Would you prefer this approach?

@egorsmkv
Copy link
Owner

egorsmkv commented Nov 6, 2025

@Serafeim-Katsaros I think, it's better to generate a password using JS instead of Python

Thank you for your feedback. I completely understand your point --- generating the password directly in JavaScript would simplify the process and remove the need for an extra backend request. I can update the implementation so the random code is generated client-side using Web Crypto API for security. Would you prefer this approach?

Yep, sounds good

@Serafeim-Katsaros
Copy link
Author

@Serafeim-Katsaros I think, it's better to generate a password using JS instead of Python

Thank you for your feedback. I completely understand your point --- generating the password directly in JavaScript would simplify the process and remove the need for an extra backend request. I can update the implementation so the random code is generated client-side using Web Crypto API for security. Would you prefer this approach?

Yep, sounds good

I've updated the implementation to generate passwords entirely on the client-side using the Web Crypto API and the AJAX calls have been removed. Please have a look when you get a chance. Thanks!

@egorsmkv
Copy link
Owner

egorsmkv commented Nov 7, 2025

Thanks. Can you check locale files and add if there's a need to add them?

@Serafeim-Katsaros
Copy link
Author

Thanks. Can you check locale files and add if there's a need to add them?

I’ve updated the locale files and added the new strings for the “Generate Password” and “Show/Hide password” buttons. They are now translatable in all supported languages.

Copy link
Owner

@egorsmkv egorsmkv left a comment

Choose a reason for hiding this comment

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

lgtm

@Serafeim-Katsaros
Copy link
Author

Hi! I’ve made the requested changes.
When you have time, could you take another look at the review?

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.

2 participants