i wanted to use bcryptjs on angualr15. it didnt work. it throws error referring to polyfills.
I made a reproducation example:
when going for ng reproduction project --skip-git
then in the cli go for: npm i bcryptjs
or npm i argon2
for simplicity lets assume we use bcryptjs for now.
then in then app.compnent.ts go for something like:
let password:string="anypasswordthatssave&5$5"
let salt:string=bcrypt.genSalt(10)
let hashedpassword:string=bcrypt.hashSync(password,salt)
then in the app.component.html
{{password}}<br>{{salt}}<br>{{hashedpassword}}
it complains about polyfill issues.
Any idea..about it? what i did wrong or what i can do to get bcrypt to work? because to me its seem like it has gotten so beginner unfriendly..
this problem is adressed to alot of webpackages.
My current solution is writing an hash class for on my own.. but thats a horrible alternative in comparison to the benefits of using hashing webpackahed like bcrypt.
Buttomline: i just started working with angular a few month ago. In terms of an issue.
I'm really looking forward to your response. There is always the option of me having misconceptions. being a beginner makes it currently really hard for me.
sadly i cannot fix the issue with what i know. also couldnt find any tutorial or reference in the angular docu i could work with.
if there is a link just anywhere.. that adresses this situation in the best possbile way even a solution. i would love to read it . please dont shut the issue down.. after i did my rerally best to provide code to reproduce the issue.
I was trying to use becryptjs to hash password string.
also I tried to add and manipulate the webapackage and polyfills (which oboith dont exist in angular 15 no more)
researched alot.
my current solution is using my own hashing and dehashing class.