Login to my website in mobile by capturing QR code

2020-04-14 08:34发布

问题:

Is there any technique used to Login to my website, on my mobile, using a qr code from the PC browser ?

(The mobile will capture the QR code from pc then open the website and log the user in ... is there any app to store the user authentications and login directly using the QR code?)

回答1:

You should have a look at SQRL from Steve Gibson at GRC: https://www.grc.com/sqrl/sqrl.htm

This does exactly what you are looking for and best of all, the crypto has been done right.

EDIT: Thanks for your comments, clarifying the question.

You could create a hash value, store it in a database, then add that to the URL in the QR code. This would then go to the website, passing in the hash value, validating it and logging the user in.

You would need to have a long hash with a short lifespan, maybe 10-20 seconds and expire the token on use.

You would have had to authenticate the user on the website first, so you know who is logging in.