DEV Community

Cover image for Authentication 🔐
Northon Iserhardt
Northon Iserhardt

Posted on

Authentication 🔐

Authentication

Let's access the authentication tab in the documentation: https://laravel.com/docs/10.x/authentication which will instruct us to use a starter kit, as we can see below:
Image description

The main starter kit to be mentioned is Laravel Breeze which has several features including Tailwind CSS for our frontend, so let's use it https://laravel.com/docs/10.x/starter-kits#laravel-breeze-installation:
Image description
composer require laravel/breeze --dev
php artisan breeze:install

To this project we're gonna choose this Livewire version:
Image description

For sure...
Image description

And then we're gonna choose PHPUnit for future unit tests:
Image description

php artisan migrate
npm install
npm run dev

Now we have 2 new links, let's register and log in:
Image description

So we have finished registration, login and password reset functionalities:
Image description

Top comments (2)

Collapse
 
petergfernandez profile image
Peter Fernandez

🤔 Building user authentication (and authorization) oneself, as part of the development of a project, is an option. However building it when it's not ones core focus can lead to a whole lot of unnecessary work - and can also open an application to some unwanted and undesirable security implications. Check out my DEV post here to see how integrating with a SaaS platform - such as Auth0 - can be beneficial for a whole host of reasons 🤗

Collapse
 
northoniserhardt profile image
Northon Iserhardt

Hi Peter,
Thank you for sharing your opinion. As you mentioned, in this project, the primary focus is not on authentication. That's why I opted to use the authentication provided by Laravel Breeze. I'll definitely check out your post.