Laravel Sanctum SPA Auth Overview

  Рет қаралды 10,908

cdruc

cdruc

Күн бұрын

Пікірлер: 40
@Redheadtama1
@Redheadtama1 10 ай бұрын
This is by far the best explanation of this process I’ve heard! Thank you for taking the time to make things clear and as simple as possible! I’ve been using Laravel for about 5 years now but I still always get stuck on implementing auth as it’s not something I do very often! I wonder if you could make a video on how to implement sanctum auth with a framework like Sveltekit. I am interested in how you would implement this when there is also another server in between Laravel and the client. There is not much info on this elsewhere on the internet! Edit: I found your video on Nuxt + Laravel so I am going to take a look at that 😊
@mon_codes
@mon_codes 20 күн бұрын
You explain it so perfectly!
@emretarhan0
@emretarhan0 8 ай бұрын
couldn't have been explained in a better way
@pindab0ter
@pindab0ter 9 ай бұрын
This is VERY good! I really think Laravel should have explanations on this topic in their own documentation. Very well done!
@lestratege4
@lestratege4 5 ай бұрын
Omg what an explanation dude... Always Small Channel makes good content and step by step.. Thank you... Try to Understand this technical words long time ago. U got a new sub. Thx again
@ademax4590
@ademax4590 10 ай бұрын
A pretty good video, thanks a lot! I'd really like to see how to implement this in code, so I'll very thankful if you will.
@hosseingh9146
@hosseingh9146 7 күн бұрын
Great explanation!
@philmareu
@philmareu 5 ай бұрын
Fantastic explanation! Great job.
@MrPaulPhan
@MrPaulPhan 4 ай бұрын
this was an amazing explanation
@mobileappsdevware264
@mobileappsdevware264 10 ай бұрын
yes. it is useful. thanks a lot
@basarokke4403
@basarokke4403 10 ай бұрын
You cover SPA. Fantastic. Will you cover Mobile Auth also? Especially Bearer Token for example react native or cordova apps? Thanks
@ArifPurnomoAji
@ArifPurnomoAji 7 ай бұрын
Amazing explanation
@jc0164
@jc0164 10 ай бұрын
wonderfull !!!
@lahbouch
@lahbouch 6 ай бұрын
thanks for the vedio very helpful
@pindab0ter
@pindab0ter 9 ай бұрын
What is the purpose of a pre-flight request? Can't we get all the allow headers from the CSRF token request and then just send the login request? To me it seems like an extra API call that we could do without. Am I missing something?
@__sanjeev019
@__sanjeev019 10 ай бұрын
Thanks a lot.
@bevedel
@bevedel 3 ай бұрын
Awesome. thank you
@pccc2011
@pccc2011 11 күн бұрын
I want to know that we will put route /login in web.php, after authenticated and get access token, all api link i request with different methods can re-use authenticated session?
@antoninmasek6081
@antoninmasek6081 10 ай бұрын
Hey, first of all - thank you for this amazing video as well as all the others. I always find real value in almost every one of them. However, I wanted to ask, whether it would be possible to expand upon this video when adding the `remember_me` functionality into the mix. A couple of times I've stumbled upon an issue, where the session expires, but the user is still authenticated because of the remember me cookie, so then if you do a POST request (for example) it results in 419 while GET requests are working. But that's just an idea/suggestion. Thanks again for the incredible content and I am really looking forward to your Masteringauth course.
@cdruc
@cdruc 10 ай бұрын
lol, you just guessed my next 2 videos 🤣 1. remember me 2. auto-fetching xsrf cookie
@antoninmasek6081
@antoninmasek6081 10 ай бұрын
Haha, that is amazing :D Will definitely keep an eye out for those :) Thanks
@delita0057
@delita0057 7 ай бұрын
is the csrf gets re produce if csrf match?
@K조셉
@K조셉 2 ай бұрын
Hey bro , im working on a laravel project with nextjs , i tried login and it worked and also user is working but when i try logout it respond with 419 error mismatch csrf token i tried everything and it still doesn't work could u pls help me😊
@ingles-u6b
@ingles-u6b 4 күн бұрын
Why is the CSRF token generated previously of login? I mean I thought, it's not necessary that the user have any ID if he doesn't identify, doesn't it?
@cdruc
@cdruc 4 күн бұрын
the token is associated to the session id. and every visitor, logged in or not, has one
@ingles-u6b
@ingles-u6b 4 күн бұрын
​@@cdruc Thanks for answer, Your content is pretty good. I hope your channel grows much more; it deserves it 😋😋
@7Janiel
@7Janiel 5 ай бұрын
I'm stuck with mine. After setting cookie and session the app login works fine. However once a refresh and try to check with api if the user is still login in the back end it Auth::check facade it returns null. Should it not return the user ?
@velocities8242
@velocities8242 2 ай бұрын
Are you still looking for help? I just figured out how to implement the login flow myself after hours of debugging.
@edi5959
@edi5959 10 ай бұрын
maximum security right? but the user's passwod is just 123456 😬
@FranceJardineVisarra
@FranceJardineVisarra 3 ай бұрын
can you make a video sanctum and next js.
@FranceJardineVisarra
@FranceJardineVisarra 3 ай бұрын
it its possible to use auth5 for authentication or no need ? if using sanctum
@darkmode404
@darkmode404 10 ай бұрын
Is it same the logic when using personal access token?
@darkmode404
@darkmode404 10 ай бұрын
I separate laravel and vue directory. So I use api token. Put it in localstorage in browser.
@cdruc
@cdruc 10 ай бұрын
not a good idea to store auth tokens in localstorage - mostly because js can reach it. andmost of your js is not really *your* js will explain more in a future video
@trispretty
@trispretty 29 күн бұрын
I don't get how you can build an API... Where you're using postman or similar. You're not coming from a server, just a desktop app .. what does the server/VM running the API think the referer is? There's no website making the request... Just an app. Really confuses me
@cdruc
@cdruc 28 күн бұрын
you add the referer header yourself: Laravel Sanctum and Postman kzbin.info/www/bejne/g6qZYoKfmN2DiNE
@ryanvelbon
@ryanvelbon 10 ай бұрын
Just stumbled on your channel. Amazing content! On which social media can we follow you. LinkedIn, Twitter?
@cdruc
@cdruc 10 ай бұрын
Thanks! I rarely post anything anywhere else, so...youtube! 😀
@darkmode404
@darkmode404 10 ай бұрын
He also have twitter 😊
Laravel SPA Authentication - setup and common mistakes
16:55
Configure Golang web apps using command-line flags
4:31
СКОЛЬКО ПАЛЬЦЕВ ТУТ?
00:16
Masomka
Рет қаралды 3,2 МЛН
Laravel Octane: supercharge your Laravel applications
8:34
Aaron Francis
Рет қаралды 47 М.
Build a Robust Access Control System like a PRO
34:42
Easy Dev For All
Рет қаралды 58
CORS in Laravel & Sanctum
10:38
cdruc
Рет қаралды 11 М.
Laravel 8 REST API With Sanctum Authentication
54:13
Traversy Media
Рет қаралды 550 М.
Session-Based Authentication in Golang
23:36
cdruc
Рет қаралды 3,9 М.
Laravel Passport vs Sanctum: What's the difference?
8:28
Andrew Schmelyun
Рет қаралды 16 М.
Sanctum & Passport, with Taylor Otwell
24:16
Laravel Podcast
Рет қаралды 3,6 М.