So storing passwords as plain text
is not a great idea,
and therefore you should hash them.
And for that attached you find a hash.js file,
which you can store in the lib folder.
And that file uses some node JS functionality
to, in the end, convert that plain text password
to a string that can't be converted back to that password.
And then this file also contains a second function,
which allows us to check passwords
and compare them with those hashed stored passwords
so that if a user tries to log in in the future,
we can find out whether the password they entered then
is the same as the hashed password
we stored in the database.
We can't convert that hashed password back,
but we can of course, rehash the password
that was entered by the user during the login process
and then see whether that's the same
as the one we hashed in the past
and we store it in the database.
And that's in the end what this function will do.
And this function therefore will become important later
once we add user login.
Now for the signup, however,
it's this hash user password function
that will be important.
And therefore here in auth actions.js,
we should now create a hash password,
which we do by calling hash user password.
So by using this function that's part of this hash.js file,
therefore of course you must import it from that file,
and then you must pass the plain text password
to it like this.
That will then give you a hash password
and it's now that hashed password
that should be stored in the database
and that's therefore how you should create new users.