How to Make a Passwordless Login System In Laravel

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

Laracasts

Laracasts

Күн бұрын

Пікірлер: 41
@christogonusobasi7882
@christogonusobasi7882 10 ай бұрын
I like the fact that you show how you debug in real life. It gives me confidence that I am not a dull lad. When I watch error-free screencasts, I feel like there is a stage in programming when you are not supposed to ever have an error in your code! Meanwhile, I got Laracast's lifetime account so that I can just copy and use straight out of the box. If you have done it, why should I repeat 🤭🤭
@vinit095
@vinit095 11 ай бұрын
At least you are also victim of random problem occuring when making a video and debugging on point. Not like other people who just doing copy paste from their 2nd screen 😅. ❤
@WhatsMyGame-hc3pr
@WhatsMyGame-hc3pr 11 ай бұрын
Great teaching as always. One quick note: I would also give positive feedback to the user in case the provided e-mail address is not in the database. This prevents guessing website users.
@DeveloperChris
@DeveloperChris 11 ай бұрын
Bad option. Bad actors continue to submit email addresses until they find as many as they need. Feedback makes it easy for them.
@andresgutgon
@andresgutgon 11 ай бұрын
So easy. I'm in love with Laravel
@borakayalar
@borakayalar 10 ай бұрын
This approch can be used for admins, sometimes admin wants to see user screen so if it has implemented for only admin users than admin can check the user screen. And Admin does need to know user's password. It is very usefull for me. It is exacly what I want. Many thaks.
@iWhacko
@iWhacko 9 ай бұрын
you have the "impersonate feature" in a couple of laravel plugins. don't use this method. it's insecure
@borakayalar
@borakayalar 9 ай бұрын
​@@iWhacko you are right! Maybe we can add another session guard and admin can login with this guarded new session. If I am wrong, sorry coz, I'm new into laravel :) still I am trying to learn detailed concept for laravel. There are many tutorails about it but anyone can not tell detailed approch , lifecycles, logic etc.... Such as service containers, providers, configs very important. When use them, you can figure it out very easyly to diffucult process. And kernel logic very important. No one does not dive to into kernel.
@BilalAmin-v5z
@BilalAmin-v5z 2 ай бұрын
thabk you laraway, you are the best.
@DeveloperChris
@DeveloperChris 11 ай бұрын
While simple security like this may seem a positive step and make life easier for your users. It's not. What if the user no longer has access to the email address? How do they log in to change it? This system can also be used in a password reset attack if the implementation Isn't protected against it. Some email systems can take quite a while before the email is delivered. For example my ISP delays emails by up to 10 min. Which means I have to wait 10 minutes before I can log in.
@devKazuto
@devKazuto 11 ай бұрын
Or not at all if the URL is valid for 5 minutes but the mail takes longer to arrive. Or your mail server is down and thus can't login. Password has always been the standard and will always be. Even Yubikey will probably never see widespread adoption, cause you'd have to carry it with you everywhere you go and if you lose it you can't just reset your password.
@wakcodes
@wakcodes 11 ай бұрын
Your videos are awesome; however, I really like the way you set up your editor. Can you please share how I can set up mine like yours?
@trippthree8842
@trippthree8842 11 ай бұрын
Yes please!
@emilianocaballero7013
@emilianocaballero7013 Ай бұрын
How can I make these changes in laravel jetstream?
@arif-khan
@arif-khan 11 ай бұрын
A question: When you hit the url with user id 2, laravel is throwing "404 | Not Found", probably because user does not exists in the database. I may be wrong, but it should throw "403 | Invalid Url" or "403 | Invalid Signature" whatever it is. I guess, Laravel is allowing the URL to be hit the method "loginWithToken" with user ID 2. Please correct me If I am wrong. Always enjoy Laracasts' Video. Keep Posting.
@richard_keep
@richard_keep 11 ай бұрын
Just tested manually and Jeffrey is right. I have a user with ID 2 and when I manually edit the URL I get the 403 INVALID SIGNATURE response.
@arif-khan
@arif-khan 11 ай бұрын
@@richard_keep noted
@MarkSnape
@MarkSnape 10 ай бұрын
This is because route model binding is performed before the validation of the signed route. So when there is no record 2, you get a 404, but if there is a record with ID of 2 then the route model binding works and the invalid signature occurs.
@nelsonmelecio
@nelsonmelecio 11 ай бұрын
I also do ray() most in my development and ray does encodes html entities in the URL most of the times..
@jontyrodrigues
@jontyrodrigues 11 ай бұрын
When you changed the user id to 2 it showed as 404 not found, shouldn't any change in the sign url give a 403 status code ? Because it looks like the validation is passing and because there is no user it gives a 404 which will be concerning, if the middleware was working then it should not give a 404. I don't know if i am correct. I'll check
@timothybelekollie6461
@timothybelekollie6461 11 ай бұрын
I have not implemented this but I was also thinking the same.
@jontyrodrigues
@jontyrodrigues 11 ай бұрын
@@timothybelekollie6461 ok i made a new laravel project and sure enough it gives me a 403 forbidden when i change the parameter not sure what happened here strange
@vinit095
@vinit095 11 ай бұрын
403 gives unauthorised which gives you a hint of that user being in the system(exposing user ID). That's why 404. That's my theory(as far as I can think about security)
@timothybelekollie6461
@timothybelekollie6461 11 ай бұрын
​ @jontyrodrigues , then it all make sense now with the 403 forbidden code.
@jontyrodrigues
@jontyrodrigues 11 ай бұрын
@@vinit095 yupp correct laravel tries to find the user first and then it tries to apply the middleware that is why if there is no user it just gives a 404, which is again bad for security but hey you could use any other implementation such as using uuid.
@enrica6616
@enrica6616 11 ай бұрын
Thank you for this great explanation. Passwordless would be better with passkey or Fido2. Is it possible to extend your example app with passkeys?
@codesmiles_
@codesmiles_ 10 ай бұрын
I'll get to know this stuff soon
@nazrinputra
@nazrinputra 10 ай бұрын
I will use this for board of directors approval email. They won’t need to login or access the system to give a quick approval.
@aogunnaike
@aogunnaike 11 ай бұрын
Thanks for this 🙏
@devKazuto
@devKazuto 11 ай бұрын
If a page or application forces me to go to my inbox and therefore doing an extra step that would otherwise be unnecessary it's a no from me. I'd rather have my browser autofill the input than having open my inbox, click on the link and close the old browser tab. Just like I hate it when pages or applications have the login inputs on different pages or the password input is revealed after submitting the email/username, thus having an extra click.
@kizoru8493
@kizoru8493 11 ай бұрын
What PhpStorm theme do you use?
@ongtheanh1852
@ongtheanh1852 11 ай бұрын
it's Carbon bro :)
@bulent2435
@bulent2435 11 ай бұрын
perfect.
@spicynoodle7419
@spicynoodle7419 11 ай бұрын
I use this for "Shit I forgot my password"
@iWhacko
@iWhacko 9 ай бұрын
My god this is such bad practice. let me explain in a couple steps: 1. email is NOT a secure channel. 2. your link might be secure, but you're sending it over an INSECURE channel. 3. You basically allow anyone who know the email to log in without knowing the password, >>> 4. if the email is compromised . 5. you removed the "something you know part" from security principles. 6. why is everyone going to 2fa? 7. to ADD another step: "Something you have". 8. convenience over security is ALWAYS bad. 9. giving a hint, that the email is not found?? BAD gives attackers info to retry with another email.
@esyx6476
@esyx6476 3 ай бұрын
how is that different from clicking "forgot password" if the email is already compromised?
@iWhacko
@iWhacko 3 ай бұрын
@@esyx6476 if you click forgot password, and the service immediately sends you a new password, yes thats bad. That's why we have security questions, to verify identity. Or nowadays, people have devices linked to their account, which can verify identity before setting a new password. NOT mailing it.
Laravel Folio First Look
20:34
Laracasts
Рет қаралды 11 М.
The Intermediate Developer Trap
18:39
Laracasts
Рет қаралды 20 М.
Magic or …? 😱 reveal video on profile 🫢
00:14
Andrey Grechka
Рет қаралды 87 МЛН
АЗАРТНИК 4 |СЕЗОН 1 Серия
40:47
Inter Production
Рет қаралды 1,4 МЛН
小丑在游泳池做什么#short #angel #clown
00:13
Super Beauty team
Рет қаралды 40 МЛН
Laravel SPA Authentication - setup and common mistakes
16:55
Sanctum & Passport, with Taylor Otwell
24:16
Laravel Podcast
Рет қаралды 3,5 М.
Using Generics with PHP
25:55
Laracasts
Рет қаралды 11 М.
Laravel Origins: A PHP Documentary
33:27
OfferZen Origins
Рет қаралды 159 М.
PHP is the future
34:27
Aaron Francis
Рет қаралды 176 М.
How to Bulk Insert Data With Laravel
23:42
Laracasts
Рет қаралды 10 М.
Ruby on Rails #97 PASSWORDLESS login with MAGIC LINK
20:34
SupeRails
Рет қаралды 1,7 М.
Magic or …? 😱 reveal video on profile 🫢
00:14
Andrey Grechka
Рет қаралды 87 МЛН