Qr code login

When I want to login to qq mail, I go to qq mail, scan a qr code with the scanner in qq and it logs me in. I could enter my email and password if I wanted to, but scanning is easy.

I would like to implement a qr code login for my little homework page.

So far, using the Python modules cv2, qrcode and numpy, I can create, save and read qr codes.

What steps do I need to take from here?

I have a feeling qq uses a 1-time password to log me in, knowing my phone number from my qq registration and or the fact that qq chat is open. The qr code for qq is not valid for long. If I wait too long, I have to request another qr code.

If I use a 1-time password, I still need the user name encoded in the qr code, along with the web address. Somehow I have to log the user in.

Maybe someone could give me a rough outline of the necessary steps. Then I can work on them one by one.

The problem would be that you are already logged into the qq app so when you scan you are basically just using the active authentication state in the app to grant another device access. Your homework page doesn’t have an app (I guess) and without making one you can’t really get more info than what would be in the qr code which is available to everybody which would mean anyone with the qr could log in. Simplest login without any more fuss would probably be to be able to request an mail (or otherwise “securely” deliver) a login link that contain an authentication token. If your page or your browser remembers the username/email then it’s basically 1 click to request the token and 1 click on the link in the email

Thanks for the reply. I can see the problem now, and no, I don’t have an app! I’m glad if I can make simple things work!

I’ll keep qr codes in mind. It occurs to me they are good for advertising. Scan the code and go to a webge!

Here in China, especially with the virus situation, the government has used these a lot: If I want to get in the visa office, I must first scan a qr, confirm something, show the green code to the guard, then I can go in.

Sponsor our Newsletter | Privacy Policy | Terms of Service