# Generating 2FA backup codes not available after adding an Authenticator

**URL:** https://meta.discourse.org/t/generating-2fa-backup-codes-not-available-after-adding-an-authenticator/331943
**Category:** Bug
**Tags:** 2fa
**Created:** [October 21, 2024, 5:31pm UTC](https://meta.discourse.org/t/generating-2fa-backup-codes-not-available-after-adding-an-authenticator/331943 "2024-10-21T17:31:31Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![sebix1](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sebix1](https://meta.discourse.org/u/sebix1)
#### Post date: [October 21, 2024, 5:31pm UTC](https://meta.discourse.org/t/generating-2fa-backup-codes-not-available-after-adding-an-authenticator/331943/1 "2024-10-21T17:31:31Z")

</div>

After adding a 2FA authenticator, the second-factor page shows correctly the added authenticator.

The _Two-Factor Backup Codes_ sections only says:

> You must enable a primary two-factor method before generating backup codes.

It’s necessary to leave the profile page and enter it again (or reload the page) to see the “Add backup codes” button.

Unfortunately, I can’t upload a screenshot here as the software always says “Sorry, but your upload failed. Please try again.” (the POST request to `https://meta.discourse.org/uploads/complete-multipart.json` returns a 422 with also just this text as JSON’ed body). But the content of the screenshot isn’t very enlightening anyway.

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [October 21, 2024, 7:15pm UTC](https://meta.discourse.org/t/generating-2fa-backup-codes-not-available-after-adding-an-authenticator/331943/2 "2024-10-21T19:15:25Z")

</div>

Yes, I can confirm that I have seen this as well, we should refresh the view after adding the 2FA authenticator so that backup codes can be created right away.

Thanks for the report!

---

<div class="post-metadata">

### Author: ![stromfeldt](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stromfeldt/32/223364_2.png) [@stromfeldt](https://meta.discourse.org/u/stromfeldt)
#### Post date: [October 7, 2025, 12:12am UTC](https://meta.discourse.org/t/generating-2fa-backup-codes-not-available-after-adding-an-authenticator/331943/3 "2025-10-07T00:12:08Z")

</div>

I was about to file a bug report as I just went through three attempts (of enabling and disabling 2FA) on two different browsers trying to generate backup codes, but fortunately did a search first. Anyway, as it’s been more than a year and this hasn’t been addressed, and supposing it may have fallen through the cracks, I figured I’d mention that this issue still exists.

 ![Xnapper-2025-10-07-10.58.25](https://global.discourse-cdn.com/meta/original/4X/7/6/d/76dc183bd50114f2b7922a8e491532ee32196cae.jpeg)

---

<div class="post-metadata">

### Author: ![keegan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keegan/32/383395_2.png) [@keegan](https://meta.discourse.org/u/keegan)
#### Post date: [October 8, 2025, 8:02pm UTC](https://meta.discourse.org/t/generating-2fa-backup-codes-not-available-after-adding-an-authenticator/331943/6 "2025-10-08T20:02:47Z")

</div>

Just pushed a fix, this should now be resolved! 🎉

[https://github.com/discourse/discourse/pull/35287](https://github.com/discourse/discourse/pull/35287)

---

<div class="post-metadata">

### Author: ![sebix1](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sebix1](https://meta.discourse.org/u/sebix1)
#### Post date: [October 9, 2025, 8:41am UTC](https://meta.discourse.org/t/generating-2fa-backup-codes-not-available-after-adding-an-authenticator/331943/8 "2025-10-09T08:41:37Z")

</div>

Great, thank you @keegan

---

<div class="post-metadata">

### Author: ![keegan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keegan/32/383395_2.png) [@keegan](https://meta.discourse.org/u/keegan)
#### Post date: [October 11, 2025, 3:00pm UTC](https://meta.discourse.org/t/generating-2fa-backup-codes-not-available-after-adding-an-authenticator/331943/9 "2025-10-11T15:00:19Z")

</div>

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