sqrldev / wordpress-sqrl-login

SQRL Login WordPress plugin
MIT License
21 stars 7 forks source link

Optical QR scanning #33

Closed wuftymerguftyguff closed 4 years ago

wuftymerguftyguff commented 4 years ago

Hi,

I have a couple of testers of my iOS client reporting problems scanning QR codes from the login page for cross device auth.

I observe that this may be related to busy background images. QR codes should always have a white margin around them.

Can you QR library do this?

Or can you wrap the image in a white div to provide some padding?

Nice work.

Sent with GitHawk

kalaspuffar commented 4 years ago

Hi @wuftymerguftyguff

Thank you for the suggestion. I already had 10px padding on a form that was set to white so it should be correct. If someone wants to change the CSS to remove the white form I can't really stop them. I've now added white to the QRCode wrapper as well.

Sadly the javascript library doesn't have any padding in its code for the surface. I'm planning on building a simple PHP library to handle this in the future but for now, this is the best I can do.

Please inform your user that they should talk to the site owner that choose to do their own design that the padded space around the QRCode is important.

Best regards Daniel

wuftymerguftyguff commented 4 years ago

Hi @wuftymerguftyguff ...

@kalaspuffar

I am sure you have seen this, but just in case.

http://phpqrcode.sourceforge.net

Sent with GitHawk

kalaspuffar commented 4 years ago

Hi @wuftymerguftyguff

Yes, thank you. I've seen this library. And I've gone through a few. Most of the libraries are large and contain "dangerous" code by WordPress review board standard. Some of them require even more dependencies.

My goal with trying to reinvent the wheel is to create a minimal library. Say one file that creates the QRCode most efficiently without any bells or whistles. Maybe it can be used by someone else or not.

But until then I will use this javascript library as it is just one file and works well for most uses :)

Best regards Daniel