Python Backend #4: Add Basic Auth to Your Flask API

Опубликовано: 19 Май 2025
на канале: NDC
583
8

🔐 Build a secure login system with Flask + SQLite!
In this video, we add a basic user system to our API — allowing registration and login using hashed passwords. This is the foundation of authentication in any backend.
Previous Video:    • Python Backend #3: Connect Flask to a Data...  
Previous Python build file: https://github.com/NDCSwift/Swift-Pro...
🔧 What You’ll Learn:
✅ How to create a users table
✅ How to hash passwords with hashlib
✅ How to register users securely
✅ How to verify login credentials
✅ How to handle errors & conflicts

🛠 Tools Used:
Python 3
Flask
SQLite (built-in)
VS Code
DB Browser for SQLite

Postman Register / Login
{
"username": "testuser",
"password": "secure123"
}

🔥 Download My Project Files
👉 Get the source code here:
🔗 https://ndcswift.github.io/Swift-Proj...

⏱️ Timestamps:
00:00 – Intro & goals
00:44 – Updating our imports
01:08 – updating our init to support users
02:32 – Creating the /register route
04:00 – Creating a hashed password
07:08 – Creating the /login route
10:45 – Quick Bug / typing fixes
11:17 – Testing user flows with Postman
11:35 – Checking hashed passwords
13:27 – Outro & What's next


На этой странице сайта вы можете посмотреть видео онлайн Python Backend #4: Add Basic Auth to Your Flask API длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь NDC 19 Май 2025, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 583 раз и оно понравилось 8 зрителям. Приятного просмотра!