Chapter 1:
Add the users service

Click the following link to clone the news aggregator app to use as a starting point.

You don’t need to have completed the News Aggregator tutorial to do this tutorial. However, you may want to complete the Feedback Form tutorial or News Aggregator tutorial if you are new to Anvil.

We’ll use Anvil’s built-in Users Service to manage sign-up and login with a single line of Python.

There are various sign-in options included in the Users Service, including two factor authentication, Google, Facebook, Microsoft Azure AD, Office 365 and more. You can find all the sign-in options here.

Step 1: Add the Users Service

Let’s start by adding the Users Service.

In the Sidebar Menu, click the blue plus button Add Service Icon and select Users.

Screenshot of the Anvil Editor with the blue plus button and Users service option highlighted

You’ll see a screen which allows you to select from the available authentication methods, and provides you with some configuration options. For now, let’s choose the following:

Supported sign-in methods:

  • Email + password

New user registration:

  • Allow visitors to sign up
  • New user accounts can be used right away

Your setup should look something like this:

You’ll also see an empty Users table at the bottom of the configuration screen. In the next step, we’ll sign up for our app, which will populate the table.

The Users Service is now set up and ready to go!

In Chapter 2, we’ll link the news articles in the Articles data table with the user who added them.

Chapter complete

That’s the Users Service set up and ready to go. Nice work! On to Chapter 2.