How to use crypto.scryptSync in Custom database login script

Trying to compare password hash stored in custom database to password entered by the user using crypto.scryptSync and i get error: “crypto.scryptSync is not a function”.

according to documentation i should be able to create a hash using: const key1 = crypto.scryptSync(‘myPassword’, ‘salt’, 64);
But that doesn’t work.

Hey there!

Sorry for such delay in response! We’re doing our best in providing the best developer support experience out there, but sometimes the number of incoming questions is just too big for our bandwidth. Sorry for such inconvenience!

Do you still require further assistance from us?