LARAVEL Authentication & Security Flashcards
6 cards from real LARAVEL practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 LARAVEL Authentication & Security flashcards as text
Which Laravel package provides a simple, pre-built authentication scaffolding including login, registration, and password reset?
Answer: Laravel Breeze
Laravel Breeze is a minimal authentication starter kit that scaffolds routes, controllers, and Blade views for basic auth features.
How do you check if a user is authenticated in a Laravel controller?
Answer: auth()->check()
auth()->check() returns a boolean indicating whether the current session has an authenticated user.
What is the purpose of Laravel Sanctum?
Answer: To provide lightweight API token authentication and SPA authentication
Laravel Sanctum offers a simple token-based authentication system for SPAs, mobile apps, and simple API token issuance without full OAuth2 complexity.
Which `auth` middleware key restricts a route to authenticated users in Laravel?
Answer: auth
The auth middleware redirects unauthenticated requests to the login page, ensuring only logged-in users can access the protected route.
What does `Hash::make()` do in Laravel?
Answer: Creates a bcrypt hash of a given string for secure password storage
Hash::make() uses bcrypt (or Argon2 depending on config) to create a one-way cryptographic hash suitable for storing passwords.
Which method verifies a plain-text password against a stored hash in Laravel?
Answer: Hash::check($plainText, $hashedValue)
Hash::check() compares a plain-text string against a hashed value and returns true if they match, used during login validation.
How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Not reviewed by a subject-matter expert. Editorial policy