Building a toy social network with Python, Part 3: Logins and user tokens

Building a toy social network with Python, Part 3: Logins and user tokens

Assessment

Interactive Video

Architecture, Information Technology (IT)

University

Hard

Created by

Wayground Content

FREE Resource

This video tutorial is part of a series on building a social networking app in Python. It focuses on implementing user authentication using tokens and secure password management with hashing. The tutorial covers setting up a login system, creating a front end for user login, and handling cookies for session management. It also discusses potential improvements and future work, such as clearing expired tokens and adding more features.

Read more

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What was the main issue addressed in this installment of the project?

Creating a new database

Implementing user login functionality

Designing a new user interface

Adding more social media posts

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which Python module is used for creating cryptographic hashes for passwords?

os

random

hashlib

json

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a salt in password hashing?

To make passwords easier to remember

To add randomness and uniqueness to the hash

To store passwords in plaintext

To encrypt the entire database

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the role of a token in user authentication?

To store user preferences

To track user login sessions

To encrypt user data

To generate user passwords

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How is the login route structured in the application?

It uses both GET and POST methods

It uses a single GET method

It uses only the POST method

It does not use any HTTP methods

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if the login process fails at any step?

The application crashes

The user receives an error message and can resubmit the form

The user is redirected to a help page

The user is logged in with limited access

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a potential issue with the token table mentioned in the video?

It may become cluttered with expired tokens

It may expose user passwords

It may not store tokens securely

It may not generate tokens fast enough