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

Toggle button displays encrypted password value #3

Open
aliwesome opened this issue Oct 31, 2024 · 1 comment
Open

Toggle button displays encrypted password value #3

aliwesome opened this issue Oct 31, 2024 · 1 comment

Comments

@aliwesome
Copy link

Description:
First off, great package—thanks for making it! We’re encountering an issue when trying to use the toggle functionality as an admin. When we click the “show” button on a form or detail view, it reveals the encrypted password value rather than the actual password.

Expected Behavior:
Clicking the toggle button should display the real password to authorized users instead of the encrypted hash.

Question:
Is there a recommended way to configure this so that the toggle reveals the real password? Any guidance would be appreciated.

Thank you in advance for your help!

@magdicom
Copy link
Owner

@aliwesome there is two use cases I can think of right now:

  1. if the password used to authenticate users into Laravel app, then it has to be Hashed for Laravel to validated on login, you can only reveal the password while you enter it for the first time or reset.

  2. the password field could be used for other values we want to remain hidden, like API secret keys, in this case we manually disable the Hashing for this field using VisiblePassword::make('API Secret')->hashOnSave(false).

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

No branches or pull requests

2 participants