Anvil: Web Apps with Nothing but Python Transcripts
Chapter: User management and authentication
Lecture: User services in Anvil

Login or purchase this course to watch this video and the rest of the course contents.
0:00 What fun would our app be where we are going to store things like measurements over time and personalized information
0:09 without having some kind of account? Luckily, Anvil makes it super easy for us to create accounts, log in with username and password
0:17 or even things like using your Google account or other accounts like that, even Enterprise accounts.
0:22 And it makes sure that it happens in a nice and secure way. Creating basic accounts is tricky. We got to make sure we store the password correctly.
0:30 And oh, what if they've got to reset their password? Now we have to be able to send email. There's all sorts of stuff around
0:35 user management and accounts. It turns out to be pretty tricky in from scratch web applications that Anvil's going to handle for us.
0:43 All of this starts with the User Service. When you create a new project it doesn't have a User Service. But, there's a Services section
0:50 and you just add the User Service and configure it as you want. So you'll see, we're going to go over there
0:54 and we're going to click on the User Service and add it to our application. Then we get to pick how users can interact with our site.
1:02 How do we want them to log in? We can say only active directory which is a way to basically have a single account
1:08 within your company, managed by your company. We could have the traditional username or password.
1:14 We could have sign in with Google or Facebook, certificates. We could actually do all of these things if we had the Enterprise plan.
1:20 So here you can see, we can configure whether you could be remembered across sessions how long that should be for, and so on.
1:27 So all this stuff we have to do to have a nice user interaction, Anvil just makes it a checkbox. That's what we're going to do in this chapter
1:34 is we're going to configure this and then integrate it into our application. You can see the little sample code at the top anvil.users.login with form.
1:42 That's a pretty simple way to get started and I think we'll start there.


Talk Python's Mastodon Michael Kennedy's Mastodon