-
Notifications
You must be signed in to change notification settings - Fork 7
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
Request: Ability to custom set masking options #11
Comments
Hi @ericlau-solid , For which masking you want this option? The feature you are talking about is already there. If you can tell me the exact use case, I can give the sample configuration. |
Send me the use case, How you are using it currently with the dummy code. I can send you the corresponding documentation and a way to do it. In case the feature is not available, I can include it in the next version. |
@ericlau-solid , Got it. But which function you are using? There are mask string, card, password, email, phone, etc... functions. There is an option "unmaskedEndDigits" which can be used for this purpose. But let me know your exact use case with some examples. I can help better |
@Sumukha1496 api keys, passwords. There are plenty of things like api keys that are secret, but we need to show the last XXXX characters so devs can compare and reasonably conclude whether key X or Y was recorded. |
@ericlau-solid, Got it. Let me think about it. I will add this in this next version. You can expect the new version before the end of this week. |
This is WIP. Some more testing and load testing is pending. I will roll out the new version once they are completed |
@ericlau-solid, If I am not wrong, what you are looking for is something like this: https://www.npmjs.com/package/maskdata#release-features Please check it and let me know. Once you confirm its working, I will close the ticket. |
You can use the version: 1.1.3 |
Also, Please take a look into the configuration: "maxMaskedCharacters". But if you don't want as many characters as in the input string and want to limit it, set maxMaskedCharacters to some valid value. You can check the documentation for more info and example |
@ericlau-solid, Let me know once you check the new version. This helps in closing the issue ticket |
@Sumukha1496 looks good. Consider it closed. |
@ericlau-solid , Thanks for the verification |
how can i retrieve the original password for user login verification |
@Marufa-Mukadam, This library masks a password and do not encrypt it. So, there is no way to retrieve the original password after masking it. If your usecase is securely storing the password and then do login verification, you need to encrypt the password and compare the hash to do login verification. This library is mainly for logging, non-retrieve usecases. Hope this helps. |
This library seems great so far. The only thing I would like to add is ability to custom set masking option, like masking all values with * but the last X chars (show those).
The text was updated successfully, but these errors were encountered: