In this video we are going to learn about Authentication.
Authentication is the process of identifying the user credentials.
In web applications, authentication is managed by sessions which take the input parameters such as email or username and password for user identification.
If these parameters match, the user is said to be authenticated.
So lets see how can we create authentication in laravel 8.
For that lets create new laravel 8 project first.
So just go inside the htdocs directory and here just open command prompt and run command.

composer create-project --prefer-dist laravel/laravel laravel8auth.

All right now project has been created.
Now lets open this project inside the visual studio code.
So switch to visual studio code and just click on add folder and now browser the projet directory.
Select laravel8auth and just click on it.
Alright now lets create a new database.
So switch to browser and here just open localhost/phpmyadmin
Now click on databases and from here create database which is laravel8authdb.
Now switch to the project and just open .env file.
And here add the data database, username and passaword.


DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel8authdb
DB_USERNAME=root
DB_PASSWORD=

.
Now save the file Now lets install laravel Jetstream package.
So switch to the command prompt.
and here first of all go inside the project directory.

cd laravel8auth


Now lets install laravel Jetstream package.
For that just type here.

composer require laravel/Jetstream


Now install livewire.


php artisan jetstream:install livewire


Now all authentication scaffolding is now generated.
Lets see the change.
So switch to the project.
Now go to the app directory.
Then action and here you can these files are genertated for the authentication system.
This is for create new user.
An this is for update user passaword.
This is for forget password.
And inside the views directory.
You can see here the auth directory.
And inside this auth directory these files are generated Login,register,resetpassword.
Alright Now lets migrate the migration.
So switch to the command prompt.
and here just type.

php artisan migrate


Inside the database you can see these tables are created which are used by the authentication system.

Now building the asset run the following command


npm install && npm run dev


Now lets run the applicaton.
So just type here.

php artisan serve


Switch to the browser and her you can see the login and register link.
Now click on register link first.
and lets register a new user.
So enter name, email, passaword and confirm password.
Now click on register.
Alright user created now lets login.
So just enter the email and password here.
Now click on login.
You can see here the user dashboard.
This is profile page , Form here you can upload you profile image.
You can change you password from here.
From here you can logout.
You can also reset you password.
Just click on forgot your password link.
Here enter you email and it will send a password reset link on you email.
So in this way can create authentication system in laravel 8.