All our tweets are protected, and should react only to the audience which we want to showcase them to. Also, anonymous users should not be allowed to tweet. For that, we will create a database and web pages to enable new users to sign in and log in to the tweet webView as well. Remember, we will use Flask to authenticate users, and also to post data to the backend user.
User authentication
Login user
Let's create our login page template, where the existing users need to fill in their username and password to authenticate. The following is the code snippet:
<form action="/login" method="POST"> <div class="login"> <div class="login-screen"> ...