GraphQL Authentication in Laravel w/ Lighthouse & Passport

  Рет қаралды 12,893

Andre Madarang

Andre Madarang

Күн бұрын

Пікірлер: 47
@NathanBudd
@NathanBudd 5 жыл бұрын
This is a great playlist! Loving your channel, and the fact that it's something different to the usual "make a to-do-list" CRUD, or make a front end but with a random API that doesn't actually store data! Keep up the great work!
@NathanBudd
@NathanBudd 5 жыл бұрын
This Auth is great, but any plans on implementing JWT with this setup?
@drehimself
@drehimself 5 жыл бұрын
JWT would be very similar to what Passport does, so I probably won't cover that.
@dbybanez
@dbybanez 3 жыл бұрын
Nice tutorial! Question, do you have an example for Sanctum?
@nightkiller1992
@nightkiller1992 5 жыл бұрын
Very nice playlist man. Keep up the good work. Thanks
@drehimself
@drehimself 5 жыл бұрын
Thanks for watching!
@joshbarros1995
@joshbarros1995 3 жыл бұрын
Wonderful video! Thanks a lot! Do you intend to teach us how to use GraphQL with Nuxt and Laravel also?
@bensaadrayen246
@bensaadrayen246 3 жыл бұрын
Great video, thanks but I've a question, is this package ' lighthouse-graphql-passport-auth' support Lumen version 8?
@MrFranciscoooooo
@MrFranciscoooooo 3 жыл бұрын
Hi andre, I have a question: Should the refresh token return user information too ? many thanks
@muhsinzyne695
@muhsinzyne695 4 жыл бұрын
hello, can you do a video on laravel graphql subscription
@josuebarros-desenvolvedorw2490
@josuebarros-desenvolvedorw2490 4 жыл бұрын
So... Passport, Sanctum and Fortify are used almost 100% of times for a SPA + API project, right?
@kevinpallado9638
@kevinpallado9638 5 жыл бұрын
How did you do the login query? Im a bit confuse
@rosalialive6569
@rosalialive6569 4 жыл бұрын
Hey Andre , i did all of that and its working fine , but when i migrate:fresh --seed and generate new keys , requeste resturn the token fine but when i try to return the user info with that token an error popup "message": "Target class [App\\Http\\Middleware\\AddAuthHeader] does not exist.",
@rosalialive6569
@rosalialive6569 4 жыл бұрын
Nvm i didnt update the new Client secret in .env
@subinshakya9877
@subinshakya9877 5 жыл бұрын
In my case, i tried this and saw "Schema is not configured for mutations." but then i went to the schema config and changed the schema path to base_path('graphql/auth.graphql') from base_path('graphql/schema.graphql'), but i again got the error saying "error": "Unexpected token < in JSON at position 0". What am i doing wrong? P.S. i am using lighthouse v3.4 and lighthouse-graphql-passport-auth v1.2. @Andre
@subinshakya9877
@subinshakya9877 5 жыл бұрын
solved it! I had to change the `schema` value from the `lighthouse-graphql-passport.php` config, instead i changed that value from the lighthouse config. Silly Mistake!
@drehimself
@drehimself 5 жыл бұрын
Glad you figured it out!
@eriknelson6268
@eriknelson6268 4 жыл бұрын
Hi Andre, I am running into an error when passing in valid user credentials in graphql playground. Even when passing a username and password that I have in my seeded database I receive an authentication exception error "Incorrect username or password". I get the same error when following the instructions from this setup as well dev.to/joselfonseca/graphql-auth-with-passport-and-lighthouse-php-14g5 Is there additional configuration I have to do for user data? My seeded user data includes name, email and password the rest of the fields are null.
@eriknelson6268
@eriknelson6268 4 жыл бұрын
I have found the issue. When I would re-seed the database, it would remove my passport password client. I am able to authenticate users now!
@timetosleep8055
@timetosleep8055 4 жыл бұрын
@@eriknelson6268 I've the same issue but this doesn't work for me.. the passport password client is in my database though.
@eriknelson6268
@eriknelson6268 4 жыл бұрын
@@timetosleep8055 try getting a new passport password client and setting it in your .env PASSPORT_CLIENT_ID=1 PASSPORT_CLIENT_SECRET= your_secret Then re seed your database and make sure it is added to your oauth_clients table. If it is not there insert it with this SQL statement INSERT INTO `oauth_clients` (`name`, `secret`, `redirect`, `personal_access_client`, `password_client`,`revoked`) VALUES ('your client name', 'your secret', 'localhost', '0', '1','0');
@timetosleep8055
@timetosleep8055 4 жыл бұрын
@@eriknelson6268 It was a stupid mistake.. I have my models in a 'Models' folder. I had to change this in the auth.php file from App\User to App\Models\User, but thanks for the help :)
@VuNguyen-lj8us
@VuNguyen-lj8us 5 жыл бұрын
Hi, firstly, thank for video. After watching video, i try it and see: "message": "Schema is not configured for mutations.", "extensions": { "category": "graphql" }, when try mutation login. Can you help me?
@trustnguyen3189
@trustnguyen3189 5 жыл бұрын
me too
@VuNguyen-lj8us
@VuNguyen-lj8us 5 жыл бұрын
@@trustnguyen3189 github.com/vunguyen10111995/graphql-laravelpassport
@trustnguyen3189
@trustnguyen3189 5 жыл бұрын
@@VuNguyen-lj8us Bạn chỉ mình cụ thể fix lỗi đó được không. Chứ đưa cả source không biết lỗi phát sinh từ đâu. Cảm ơn bạn!
@VuNguyen-lj8us
@VuNguyen-lj8us 5 жыл бұрын
@@trustnguyen3189 giờ mình ko làm lại nên mình cũng ko nhớ lỗi đó tại sao, nhưng trong lúc mình làm thì mình có bị lỗi này. sau này mình sửa lại và tạo repo thì hết. giờ mở lại chắc phải có thời gian b ạ :(
@trustnguyen3189
@trustnguyen3189 5 жыл бұрын
@@VuNguyen-lj8us mình thấy bạn ko có cài lighthouse nữa mà là 1 thư viện khác. Để mình tìm hiểu thêm. Cảm ơn bạn!
@mauricioadolfozabalarojas7134
@mauricioadolfozabalarojas7134 5 жыл бұрын
Great video, thanks!
@drehimself
@drehimself 5 жыл бұрын
Thanks for watching!
@mauricioadolfozabalarojas7134
@mauricioadolfozabalarojas7134 5 жыл бұрын
@@drehimself Hello Andre, sorry by my English, i from Bolivia, and want use GraphQL with vue framework Quasar but i dont know how do it, i try make a boot file but dont work :(
@serhiiivanenko9155
@serhiiivanenko9155 5 жыл бұрын
Thanks! It was helpful
@drehimself
@drehimself 5 жыл бұрын
Thanks for watching!
@shahinsharifi6187
@shahinsharifi6187 4 жыл бұрын
You are so cool!
@aArcziMetin2
@aArcziMetin2 5 жыл бұрын
Thanks for it! However, you should not expose client secret.
@drehimself
@drehimself 5 жыл бұрын
Thanks for watching! It is protected on the server side and never exposed on the client.
@marcotuliolacerda2600
@marcotuliolacerda2600 4 жыл бұрын
Thanks! good!
@Mohamed-wd1cv
@Mohamed-wd1cv 5 жыл бұрын
thank you bro
@drehimself
@drehimself 5 жыл бұрын
Thanks for watching!
GraphQL Authentication in Vue Apollo
23:02
Andre Madarang
Рет қаралды 15 М.
GraphQL Laravel server w/ graphql-laravel
26:08
Andre Madarang
Рет қаралды 7 М.
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
Google’s Quantum Chip: Did We Just Tap Into Parallel Universes?
9:34
GraphQL Client in Laravel
16:24
Andre Madarang
Рет қаралды 9 М.
Build GraphQL API with Laravel
35:01
Icodestuff
Рет қаралды 8 М.
Laravel and Paypal Checkout API
28:40
Andre Madarang
Рет қаралды 65 М.
Laravel GraphQL - Lighthouse v2 Walkthrough
23:49
Christopher Moore
Рет қаралды 8 М.
GraphQL w/ Laravel & Vue - Lighthouse Package Backend - Part 2
31:44
Andre Madarang
Рет қаралды 15 М.
Laravel Pulse - Insights and Application Performance
19:41
Andre Madarang
Рет қаралды 10 М.
GraphQL w/ Laravel & Vue - Overview - Part 1
37:14
Andre Madarang
Рет қаралды 56 М.
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН