TOTP modal problem (Cooperation with 2FAS Browser Extension)

AI-generated summary

TOTP Modal Problem with 2FAS Browser Extension

Developer Greg311 from 2FAS Browser Extension is experiencing issues with the TOTP modal on Discourse-based websites. The problem lies with the “Log in” button being outside the form and not being of submit type. Greg311 suggests the following changes to resolve the issue:

  • Move the button inside the form
  • Change the button type from “button” to “submit”
  • Rename the button text to something more TOTP-specific, such as “Verify” or “Next”

pmusaraj suggests changing the button text as a possible fix, but Greg311 would prefer additional changes, including adding a data attribute like data-action="totp-submit" for better compatibility with the extension.

Hi,

I am Greg Zajac, developer of 2FAS Browser Extension. In version 1.6.0 we introduced new auto submit feature for TOTP codes. It’s hard to support every website that supports 2FA, but I’m trying my best. Unfortunately, our user reported an error occurring on pages based on Discourse script. GitHub Issue

I investigated DOM and I found that “Log in” button in TOTP modal is outside the form.
image
Additionally, this button is not of submit type and is a regular button.

Try to consider changes in this area. My suggestions:

  • Move button inside form,
  • Change button type from button to submit,
  • If you can, change the text “Log In” (which we ignore for TOTP, because such text usually concerns the login form) to e.g. “Verify”, “Next” or other more TOTP phrase.

Thank you in advance :wink:

3 Likes

Thanks for reaching out, Greg.

This would be the easiest change on our end. Do you think making only this change will fix the issue for your extension?

I made a little bit of hack and it should be working in future release, but ideal for me would be adding some data attribute for this button
image
For example data-action="totp-submit" or something similiar :wink: