How to Generate an Bearer Access Token | Laravel API Course | Learn Laravel API | Laravel API
HTML-код
- Опубликовано: 8 сен 2024
- In this video we will be creating an access token to grant a client permission to access the API - Learn how to create APIs in Laravel for its real-time communication support.
📚 New Udemy Course
If you're looking to level up your Laravel skills, my new course "Udemy Migirations, Seeders, Factories, Query Builder, Eloquent & Relationships" is the perfect opportunity. Learn the essential tools and techniques for building robust and scalable web applications with Laravel: www.udemy.com/...
📲 Let’s plan a meeting
Plan a (paid) 1-hour meeting on Calendly to do portfolio reviews, code reviews resume reviews or a coaching session for Laravel. Please read the description before booking: calendly.com/c...
💌 Newsletter
Sign up for my free weekly email newsletter: www.newsletter...
🔥 Resources
- PHP Hosting (10% DISCOUNT): www.hostinger....
- TikTok: / codewithdary
- Instagram: / codewithdary
- Twitter: / codewithdary
- Blog: blog.codewithd...
- Newsletter: newsletter.cod...
- Patreon: www.patreon.co...
- GitHub: github.com/cod...
Want to learn more?
- Courses: / @codewithdary
#laravel #laravel8 #laravelapi #api #bearer
LETS CONNECT THROUGH INSTAGRAM.
instagram.com/codewithdary
for those getting error message Unauthenticated even the token is correct
just replace laravel 8 prebuilt routes api
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
return $request->user();
});
into
Route::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user();
});
this is the solution greate tutorial sir dary godbless ^^
Thank you very much. I would have skipped this part of the tutorial, if I didn't get your comment.
It worked now and you made my day.
Thank you, Sir!
Thank you
Excelent Course!! I'll keep you on my radar. Thanks!!
Awesome man thank you! :)
Awesome instructor on YT 💗
I appreciate that!
Hey! Thank you so much. Exactly what I was looking for. I just could not understand how to work correctly with these tokens.
Hi! I should that you for watching buddy!
I'm pretty sure Laravel Passport now has been upgraded, no need to add the routes function and in some cases when testing the access token, you'll realise that Auth guard [Passport] will not be executed for some reason
Interesting, thank you for sharing. Haven't used it in a while but good to know!
Good content and very understandable explanation. But without user registration it all useless from practical point of view
Hey there dear god of Laravel i got one question , ould you please make a video of how to do the SEO right for various types of situations, we currently are really stuck on that question cause we got a seperated layouts and i dont know what to do in this kind of situation, its lke we got single app and home.blade.php layouts and we are yielding the main staff in between both of them by simply extending them from another directory , thank you for your videos they helped me a lot during development
Ha! Thank you Vahag! You can setup your database for that. Create a SEO table where you add meta_key etc. Create a pivot table per page so you can easily pull it in.
@@codewithdary thank you for the advise bro , guess something will be made no something great will be made
Thanks!
No problem!
Thanks for the video. I have been contemplating on the difference between access token and api key. Api key is what we get mostly when using third party apis. How can api key be implemented Pls? Thanks for the help
Do you mean Oauth? That is mostly being used for third part apis.
Nice tutorial
Thank you! Cheers!
having this error : "message": "Auth guard [api] is not defined.",
mr DARY can you do a video with nwidart/laravel-modules and what is the right way to make a laravel application as a SAAS ? for different clients ( while using the same database )
I'm working on the API course right now and I'm doing an authorization & authentication course after!
@@codewithdary No worries thanks for all the hard work it's appreciated a lot
thank:)
Thank you for watching :)
Great! I love you ;)
Much love back!
Sir please Please Login And Registration Api create.... please please
you are using tinker and run RAW command please make video special for Login + Registration
Maybe in the future!
Mr dary how can i protect my API with a custom API middleware in laravel and also generate a token that will be used as a bearer token to access my endpoints
"error": "invalid_grant" -> can you please help me here?
It's either one of the following 3:
- the client_id - client_secret pair don't match with each other
- the id-secret pair isn't for a password_client but for a personal_access_client (check those columns in the oauth_clients table)
- the password is wrong
I am considering joining ur patron to get access to the discord.
I mean, I think its worth it! Haha!
@@codewithdary I did it I'm a Patreon now haha. Your videos are great and I rly need help on my project so guess its a win-win situation hahha
i will be waiting for your answer
Responded ;)
if love had a face :)
Haha! Love back ;)
anyone can pickup whats written inside the documentation and make a video out of it. the important part is to explain what are the pieces and why they should be in place. this is what your tutorial lacks. i recommend you watch this tutorial over the same concept so that you can notice the difference:
ruclips.net/video/YGqCZjdgJJk/видео.html
I'm good brother, take care watching that tutorial.