I made similar apps for restaurant's e-menu. I just simply put hidden form inputs with auto generated token and user_id each time it's refreshed. I put the e-menu url in the qrcode, whenever a user scans the qrcode, it redirect user to the e-menu url. Once the user enters the url, it will automatically submit the form (submit form on load) and create the session
The idea here is - our user has logged in on mobile already. Then, when he scans the QR code - that QR code token is associated with an already logged in user on mobile. In short - user has to be already logged in on mobile for this to work. Without it - it won't correctly authenticate.
The idea here is - our user has logged in on mobile already. Then, when he scans the QR code - that QR code token is associated with an already logged in user on mobile. In short - user has to be already logged in on mobile for this to work. Without it - it won't correctly authenticate.
@@SingularTechie It is not logging in the same user. It is more to pass the session to a new device. Lets say, you are logged in on your phone as you created that account while out in the city. Now, once home - you can either enter your password or log in without using the password at all. This saves time :) Ps. It would be really weird to log someone in just by scanning a qr code and not being authenticated. That would be a huge security issue…
Thanks for the awesome video, it's really a helpful one.
This is whats is needed. Thanks!
I made similar apps for restaurant's e-menu. I just simply put hidden form inputs with auto generated token and user_id each time it's refreshed. I put the e-menu url in the qrcode, whenever a user scans the qrcode, it redirect user to the e-menu url.
Once the user enters the url, it will automatically submit the form (submit form on load) and create the session
Thank you very much! It is very useful
Thanks. Is there a package for fingerprint scanners?
I haven't worked with projects that had fingerprint scanner, so I don't know.
@LaravelDaily Web Dev Simplified actually sorted me. ua-cam.com/video/viZs1iVsLpA/v-deo.htmlsi=o-gtrXKYewBYxjVa
wow, cool!
So with this method i can log my account out from other devices.
Yes. Laravel also have a native method for it inside the framework, but we implemented it in our custom way here.
Would you kindly add more details on the native way of doing this?
@@LaravelDaily
Here's the link to the docs: laravel.com/docs/11.x/authentication#invalidating-sessions-on-other-devices
Thanks for the video. Just not clear how to make the user previously registered username/password related to logged in through QR code.
The idea here is - our user has logged in on mobile already. Then, when he scans the QR code - that QR code token is associated with an already logged in user on mobile.
In short - user has to be already logged in on mobile for this to work. Without it - it won't correctly authenticate.
After scan QR we set user as log in, but page will refresh after 1s not immediately? Maybe use websockets for less load
Yes, as I mentioned, the alternative approach is to use something like Laravel Reverb. More work to set up, though.
Need example about sso one user can login two different app all two apps under the same organization
How do you know which user is loged in? I didn't cover it🙄
The user is already logged in on mobile
same question
The idea here is - our user has logged in on mobile already. Then, when he scans the QR code - that QR code token is associated with an already logged in user on mobile.
In short - user has to be already logged in on mobile for this to work. Without it - it won't correctly authenticate.
@@modestasmvinteresting, but what is the reason to login an user that is already logged in?
@@SingularTechie It is not logging in the same user. It is more to pass the session to a new device. Lets say, you are logged in on your phone as you created that account while out in the city. Now, once home - you can either enter your password or log in without using the password at all. This saves time :)
Ps. It would be really weird to log someone in just by scanning a qr code and not being authenticated. That would be a huge security issue…
How do you approach projects with e-commerce involved?
Not sure what is the actual question here that I could answer in a UA-cam comment.
@ I was hoping to know your tech stack for building an ecommerce project using php.
I personally prefer TALL stack these days.
@@LaravelDaily Thank you.