0
0
Fork 0
mirror of https://github.com/healthchecks/healthchecks.git synced 2025-04-05 05:15:26 +00:00
Commit graph

3 commits

Author SHA1 Message Date
Pēteris Caune
18585d163d
Improve double-submit prevention in the TOTP form
Chrome users could submit the form multiple time by entering the TOTP
code and then pressing Enter key, or clicking the onscreen submit
button. This would be less likely on low latency connections (because
auto-submit would complete before the user presses Enter key) but quite
doable on high latency connections.

The fix is to attach an event handler to form's "onsubmit" events.
The handler lets the first event through, and call preventDefault()
on subsequent events. This takes care of:

* programmatic submits by calling form.requestSubmit()
* Enter key in an input field
* click on the onscreen submit button
2025-03-14 10:43:58 +02:00
Pēteris Caune
e5ac8d7dbc
Update the "Add TOTP" form to display plaintext TOTP secret
Fixes: 
2022-01-24 15:17:48 +02:00
Pēteris Caune
222722569e
Add support for 2FA using TOTP
Fixes: 
2021-07-30 16:43:23 +03:00