Login asking for Two Factor Authentication when clicking "Sign in" under vote count


(Kameron Bourgeois) #1

So I installed the plugin and it is awesome, but when a user who is not signed in clicks the 'Log In" under the vote count then it prompt them to the normal login + a two factor authentication below. I am afraid that the two factor authentication text box might confuse my users. When clicking the other sign in buttons on the site, the two factor text box does not appear. The Two Factor Authentication box only appears for the voting login button. I couldn’t find any settings that could be causing this. Any help would be greatly appreciated in removing the two factor authentication text box! Thanks!

Here is an image of the button that I am having the issue with and the prompt it gives

I am also running my Discourse forum on DigitalOcean if it matters.


(Jay Pfaffman) #2

I had a user that was confused by a two factor prompt as well. I don’t think that the voting plugin is installed.


(Kameron Bourgeois) #3

Can you explain that last sentence again please? I definitely have the plugin installed.


(Sam Saffron) #4

@featheredtoast why is two factor auth showing up here?


(Kameron Bourgeois) #6

If it helps, here is the link to my forum https://forum.milehighhub.com

and a link to a post with voting enabled so you can see the two factor auth popping up Testttttt - Video Of The Season - The Official Mile High Hub Forum


(Jeff Wong) #7

I’m digging in - Looks like there are different results of showing the login modal from the builtin login button vs the plugin’s. Two factor is being shown because it’s missing some css rules due to the different html structure. The entire login layout gets screwed up here, including social login buttons. Hang tight while I get to the bottom of this one.


(Jeff Wong) #10

Looks like the login modal is not happy in general if not called from the parent route. Fixed here :kiwi_fruit:

@pfaffman if there was another plugin in addition to this one that was calling showModal, that would cause the same issue.


(Jay Pfaffman) #12

Thanks, @featheredtoast. Is this how I’d find out?

find . -type f -exec grep -l showModal \{\} \;
./discourse-local-dates/assets/javascripts/initializers/discourse-local-dates.js.es6
./discourse-staff-notes/assets/javascripts/discourse-staff-notes/lib/staff-notes.js.es6
./poll/assets/javascripts/initializers/add-poll-ui-builder.js.es6
./discourse-canned-replies/assets/javascripts/discourse/initializers/add-canned-replies-ui-builder.js.es6
./discourse-canned-replies/assets/javascripts/discourse/components/canned-reply.js.es6
./discourse-canned-replies/assets/javascripts/discourse/connectors/editor-preview/canned-replies.js.es6
./discourse-canned-replies/assets/javascripts/discourse/controllers/edit-reply.js.es6
./discourse-canned-replies/assets/javascripts/discourse/controllers/canned-replies.js.es6
./discourse-canned-replies/assets/javascripts/discourse/controllers/new-reply.js.es6
./discourse-custom-wizard/assets/javascripts/discourse/controllers/admin-wizard.js.es6
./discourse-assign/assets/javascripts/discourse-assign/initializers/extend-for-assigns.js.es6
./discourse-assign/assets/javascripts/discourse-assign/connectors/topic-footer-main-buttons-before-create/assign-button.js.es6
./discourse-data-explorer/assets/javascripts/discourse/controllers/admin-plugins-explorer.js.es6
root@mr-web-only:/var/www/discourse/plugins# 

(Jeff Wong) #13

It’s a start - To clarify, a showModal call by itself is fine, but the login modal specifically has a few hooks that also need to be triggered in order to display correctly. You’d get less false positives by filtering specifically on showModal('login') or showModal("login").


(Kameron Bourgeois) #14

Thanks for figuring out the bug! Can I ask how I implement your fix? Or will the fix be automatically applied to my forum once the plugin is updated?

Thanks!


(Sam Saffron) #15

All you need to do is update the forum via the web UI.


(Jeff Wong) #16

This topic was automatically closed after 5 days. New replies are no longer allowed.