No QR Code To Associate With Account

  • New Wordpress Plug-In Forum
    Guest:

    Just a note that we have a new forum to contain discussions relating to the Wordpress plug-in which Daniel Persson originated and has been making great progress on. You'll find it under "Server-Side Solutions."

    /Steve.

hoadlck

New member
Jun 16, 2019
2
0
I have an existing multi-site WordPress instance (5.2.2). I installed the plug-in, and updated the network.

I went to the users area, and tried to add my sqrl identity to my existing login. While I can see an area talking about sqrl, there is no QR code. Here is a snippet of the profile page:

485

When I try to log into the website, I do see the QR code. The problem is just in associating my existing account with my sqrl identity.
 

PHolder

Well-known member
May 19, 2018
918
124
Can you look at the HTML page source and see if anything about the QR Code shows up at all?
 

kalaspuffar

Well-known member
May 19, 2018
269
91
Sweden
coderinsights.com
Hi @hoadlck

It seems like using JavaScript libraries in the admin area are cached. No WordPress expert but others have cleared browser caches and other cache functionalities incorporated in WordPress.

Best regards
Daniel
 

hoadlck

New member
Jun 16, 2019
2
0
@kalaspuffar I tried using Chrome instead of Firefox, and saw the same thing. I cleared the cache in Chrome, and there was no change.

@PHolder The HTML source looks pretty similar between the associate page and the regular login.

Here is a snippet from the associate page (which is not working):
HTML:
<a id="sqrl"
   class="sqrl-button"
   href="sqrl://mysite.com/wp-admin/admin-post.php?action=sqrl_auth&nut=mblahblayy" onclick="sqrlLinkClick(this);return true;"
   encoded-sqrl-url="clotsoflongstuffk"
   tabindex="-1"
>
  <img src="https://mysite.com/wp-content/plugins/sqrl-login/images/sqrl_outline.svg"/>
  <div>Associate with account</div>
</a>
Here is a snippet from the login page (which is working):
HTML:
<a id="sqrl"
   class="sqrl-button"
   href="sqrl://mysite.com/wp-admin/admin-post.php?action=sqrl_auth&nut=vblahblahi" onclick="sqrlLinkClick(this);return true;"
   encoded-sqrl-url="clotsofstuffk"
   tabindex="-1"
>
 <img src="https://mysite.com/wp-content/plugins/sqrl-login/images/sqrl_outline.svg"/>
 <div>Sign in with SQRL</div>
</a>
 

Vela Nanashi

Well-known member
May 19, 2018
633
107
I do not see anything related to a QR code there, making me wonder if some script is supposed to insert that inside the DIV, maybe that code is not loading on the page. Have these been changed in some way recently @kalaspuffar so they need cache clearing of old versions?
 
  • Like
Reactions: kalaspuffar

kalaspuffar

Well-known member
May 19, 2018
269
91
Sweden
coderinsights.com
I do not see anything related to a QR code there, making me wonder if some script is supposed to insert that inside the DIV, maybe that code is not loading on the page. Have these been changed in some way recently @kalaspuffar so they need cache clearing of old versions?
Hi @Vela Nanashi

This is added by JavaScript. But I was lead to believe this was a new install so it should be present. Not updated the JavaScript code the last week. And will probably not do that later either.

Would like to have PHP solution going forward to lessen the issues a JavaScript solution might cause but did not have the time to implement one.

Best regards
Daniel
 

Vela Nanashi

Well-known member
May 19, 2018
633
107
I would want most of the code for SQRL to be done on the server side myself, including QR code generation, but I have never generated images via php myself. Would probably use something like SQRLcode.php&encoded-sqrl-url="all the stuff" on an img src :) but yeah I don't even have a clue how QR codes work, and I am rusty at php, but I think one might reverse engineer the javascript for hints when coding a php version. I know CPS and other stuff might need actual javascript, but I have not looked at any of that myself :)
 
  • Like
Reactions: kalaspuffar

kalaspuffar

Well-known member
May 19, 2018
269
91
Sweden
coderinsights.com
Hi again.

I reviewed the code and realized I have two simple improvements to do with the JavaScript that might make it more reliable.

I'm on vacation away from keyboard a week though so I might look into this later this week.

Best regards
Daniel