Comments (4)
@gragland let me know if you want to see this implemented. I might be able to work on it.
from fake-auth.
Hey there, I'm not sure I understand the point of adding any kind of security here, as this is only meant to be used when prototyping and the code of this library isn't really intended to be a good example of a production auth system (which would look very different and hashing would happen on the server). Maybe you can clarify your reasoning?
from fake-auth.
@gragland I understand that this library is for prototyping, and a production-level security is not needed. However, storing plain passwords might really damage your reputation. In my case, that surprised me, and not in a good way.
Perhaps, consider setting expectations clearly that the password will be stored unhashed when using fake-auth (on the registration form or as a pop-up).
from fake-auth.
And by the way, it's really easy to use hashes (even with salt and multiple rounds). There is this library called bcrypt
which produces a hash with only:
await bcrypt.hash(password, pwdSaltRounds);
this produces something like $2b$12$1mE2OI9hMS/rgH9Mi0s85OM2V5gzm7aF3gJIWH1y0S1MqVBueyjsy
, see this stack overflow.
And then to verify password:
await bcrypt.compare(password, user.pwdHash);
I think any eng would appreciate this little security measure in fake-auth.
from fake-auth.
Related Issues (2)
- Typescript HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fake-auth.