PHP: User Authentication
1h 28mIntermediate2021-09-07
Authors

Kevin Skoglund
Founder of NovaFabrica
Course details
Do you need to know how to apply best practices for user authentication in PHP? This course walks you through a series of best practices that you can apply to your own PHP projects to avoid costly security pitfalls. Instructor Kevin Skoglund gives you an overview of user authentication in PHP, then dives into how you can implement it. He steps through creating the database table, adding new users, logging users in and out, and controlling access to pages and functions. Kevin shows you how to work with strong passwords, prevent weak ones, and reset forgotten ones. He shows you how to secure user authentication by preventing insecure direct object references (IDOR), using HTTPS, protecting access tokens, and keeping track of logins. Kevin concludes with a challenge/solution set exploring how to write PHP code that expires a user login after a set amount of time has passed.
Skills covered
Identity and Access ManagementPHPCybersecurityProgramming LanguagesOpen SourceSoftware DevelopmentDeep Dive (X:Y)
Concepts
0. Introduction
- 01 - Restricting user access in PHP applications
- 02 - How to use the exercise files on GitHub
1. User Authentication Overview
- 03 - Identification and access control
- 04 - Hashing and storing passwords
2. Implementing User Authentication in PHP
- 05 - Creating the database table
- 06 - Introducing the sample project
- 07 - Adding new users
- 08 - Logging in users
- 09 - Logging out users
- 10 - Controlling access to pages and functions
- 11 - Challenge - Editing users
- 12 - Solution - Editing users
3. Working with Strong Passwords
- 13 - Password requirements
- 14 - Preventing weak passwords
- 15 - Resetting forgotten passwords
4. Securing User Authentication
- 16 - Preventing IDOR
- 17 - Using HTTPS
- 18 - Protecting access tokens
- 19 - Keeping track of logins
- 20 - Challenge - Expiring logins
- 21 - Solution - Expiring logins
Conclusion
- 22 - Next steps
Related courses
- Building APIs in PHP Using the Slim Micro Framework
- PHP with MySQL Essential Training: 2 Build a CMS
- PHP: Object-Oriented Programming with Databases
- Laravel 6 Essential Training: Testing, Securing and Deploying Apps
- Learning CakePHP 3
- Laravel Essential Training
- Laravel 9.0 Essential Training
- Learning PHP: Building Dynamic Websites from Core Concepts to Applications