mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 06:20:23 +08:00

This is a fix for this bug: https://meta.discourse.org/t/-/133185?u=blake where rails would throw a missing template error when trying to confirm a new email address when you had two factor backup codes enabled. Apparently this feature broke during this commit: 68d35b14f4b5193c1bae0f175b9e461152e13ac7 when a partial that contained a lot of javascript was removed most likely because it didn't comply with our Content Security Policy, so as a fix I rewrote the previous js functionality without using any javascript and then added a spec to verify that the correct backup code form is displayed when that page is loaded.