Python for Entrepreneurs Transcripts
Chapter: User accounts and identity
Lecture: Accounts introduction
Login or purchase this course to watch this video and the rest of the course contents.
0:02 There is a very good chance that you are going to need to manage user accounts as part of your online business.
0:09 It could be that you just put them on your mailing list and you email them things and they do transactional purchases or something to this effect.
0:16 But for most businesses, we want to have users come back to our site, have an account, be able to log in and have access to things.
0:23 And if that's the case, we're going to need to talk about how you create model and store user accounts.
0:29 Not just how do you make it happen, but how do you do it securely, and in a way that is really delightful for the users.
0:37 Like everything we put in our database we're going to need to model users in SQLAlchemy,
0:43 we want to create our user or account class that map that to the database,
0:46 so we'll see how to do this in a way that is secure as well as high-performance,
0:51 so make sure we have the right indexes and uniqueness constraints and things like that.
0:55 We're going to talk about the importance of strong password hashes, it's hardly a week that goes by that you don't hear some major web application
1:04 losing all of their user accounts, their database being dumped in one way or another for a variety of reasons.
1:11 If you do things correctly, that will have no big impact in the world, right, it will be too hard for people to recover the passwords.
1:18 But most sites do this wrong, luckily we're using Python which makes it really easy as you'll see.
1:25 The thing that makes is easy is this library called passlib, so we're going to be using passlib to hash and manage the sort of encrypted
1:32 one-way hashed elements in our database. And primarily that is going to be our passwords.