Current section: Password 5 exercises

Generating Passwords for Secure User Creation

Loading exercise


00:00 Even though our password isn't required, it actually would be really nice if we made sure that the users we create do have passwords. And so your job is to update our seed script so that our users have passwords generated. For the Kodi user, we can generate a password that will just remember.

00:18 So I call it Kodi loves you. You can call it what you like, but Kodi does. Yeah, I love you. Kodi does care about you. So that's what the password for Kodi is. For the regular users, I just set it to be their username for just the users we're seeding. Of course, regular users should not do that,

00:38 but that's what we're gonna do for our seed data to make it easy to log into any user. And so yeah, you're gonna make a utility for generating passwords that will resemble the utility we use to cryptographically hash the passwords that the users give us. So that's your task here, and get to it.