yrccondor / wp-webauthn

🔒 WP-WebAuthn allows you to safely login to your WordPress site without password.
https://wordpress.org/plugins/wp-webauthn
GNU General Public License v3.0
124 stars 16 forks source link

Login shortcode and gutenberg block not working #59

Open NIX-CRO opened 8 months ago

NIX-CRO commented 8 months ago

Hello, first of all, love your work.

On to my issue, my passwordless login works like a charm on my pc through default login form. The issue is that the login forms i tried creating with provided shortcodes and gutenberg blocks for my users that will register their custom roles through ultimate member don't work. Specificaly login block when I press "Auth" button nothing happens. I tried putting them in a custom popup (both shortcode and gutenberg block) and on a normal wordpress page. Other shortcodes Register Form, Verify Button, Authenticator List seam to work without issues and I can register authenticator and verify it is working , but when I use Login Form and press "Auth" nothing happens and nothing is loged in a Log. Could you verify this behaviour,

thanks in advance.

PS: Is it possible to translate part of visible text to users?

My1 commented 6 months ago

there is a little bit of info in the Browser Console:

Uncaught TypeError: Cannot read properties of null (reading 'previousElementSibling')
    at HTMLInputElement.wwa_auth (autoptimize_31fb59582e42cf224cf5adbdb4b3ea22.js:23:57)
wwa_auth @ autoptimize_31fb59582e42cf224cf5adbdb4b3ea22.js:23
yrccondor commented 6 months ago

Thank you @My1 will fix asap

My1 commented 3 months ago

any luck?

Mathijsvdbeek commented 3 months ago

I also experience problems logging in using a form. Using standard is no problem.

darkmich commented 2 months ago

I'm seeing the same behavior - the error is on this line: let wwa_username = this.parentNode.previousElementSibling.previousElementSibling.getElementsByClassName('wwa-user-name')[0].value; and the error is: "TypeError: null is not an object (evaluating 'this.parentNode.previousElementSibling.previousElementSibling.getElementsByClassName')

darkmich commented 2 months ago

Changing that line to this fixed it for our site (I realize that might not work for everyone...): let wwa_username = document.getElementsByClassName("wwa-user-name")[0].value;