Laravel 8 Tutorial - API Authentication With Sanctum

preview_player
Показать описание
In this video I will talk about API Authentication With Sanctum.

TOPIC DISCUSSED:

API Authentication With Sanctum
Register User
Login and Generate Token
Remove Token
Sanctum Installation and Configuration

Your Queries -

1.How to authenticate api in laravel 8?
2.How to authenticate api using sanctum in laravel 8?
3.How to install and configure sanctum in laravel 8?
4.How to generate token using sanctum in laravel 8?
5.How to remove token using sanctum in laravel 8?
5.What are the steps for sanctum api authentication in laravel 8?

FOLLOW SURFSIDE MEDIA:

#laravel #laravel8 #laravel8x
Рекомендации по теме
Комментарии
Автор

Very helpful tutorial! What I would like to advise you is to return the status_code as a second parameter of json() method, not in the body.
For example response()->json(['message' => 'Error!'], 400); That is in regard to REST. But my appreciations for the video, again!

MrLuboooo
Автор

Very nice tutorial, yes! I've question what is the definition of Auth (10:15), where you write Auth::attempt?

ivo
Автор

Thank. Will this work in Postman if you are using a CSRF token? Or will you fail to check?

diatm
Автор

You shouldnt need to modify the app/Http/Kernel.php file at all because the official Laravel 8 docs say that is only needed for SPA Authentiation (see 2:21 in the video)

omarjebari
Автор

Very interesting video! I just tested and worked successfully ... and I just subscribed for more useful solution :)

miratechsolutions
Автор

nice and point to the topic. Thank you.

softwareEngineerKunwar
Автор

What does Auth::attempt($credentials) do basically ? i am confused i saw an article where he does authentication using jwt there he does user JWTAuth::attempt(credentials) so i didn't understand what does it mean?

noorulamin
Автор

how about when we see member data but only specific data when entering the token?

UICreativeStudio
Автор

So how we pass the Authorization Bearer when testing with views, ? Because after loging in it just returns the response( ).
I think you should make an example about it

onemetro
Автор

i do get 400 error each time i enter data in raw form, i followed the code but i still got 400 error when i'm registering user ? can you help please

deweimusic
Автор

Is it possible to display api data in laravel blade..

ABHISHEKKUMAR-nerk
Автор

How can we return json error when user tries to access protected route, instead of redirect to login.. ??

hussainwali
Автор

why i cant success, unauthenticated, even i filled authorization with token given

ramdhannugraha
Автор

How to add prefix in default /login & /register api in laravel sanctum ?

Ex. Default api are /login & /register
I want /api/login & /api/register

How to achieve this?

Also in /user api i am getting many fields like id, name, email, created_date

I just want name and email id
How to do that?

bxrank
Автор

sir please integrate payment handling like stripe and paypal

imgohar
Автор

why this error ?
Error: Class 'App\Http\Controllers\Auth' not found in file

MuhammadDannyWaskito
Автор

Am having serious problem with laravel 8 cors, is not working please can you help me out.

taiwotaiwo
Автор

Sir please create invetory project

Please please sir 🙏🙏🙏 reply

fattehalisunasarasunasara
Автор

Sir upload laravel livewire datatables & load more functionality video

parasnshah
Автор

If logout is not working use this
$user = request()->user();
$user->tokens()->where('id',

anujsharma-goon
join shbcf.ru