# What algorithm does 2FA use?

**URL:** https://meta.discourse.org/t/what-algorithm-does-2fa-use/330478
**Category:** Support
**Created:** [October 11, 2024, 6:16pm UTC](https://meta.discourse.org/t/what-algorithm-does-2fa-use/330478 "2024-10-11T18:16:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![First\_Name](https://avatars.discourse-cdn.com/v4/letter/f/7ab992/32.png) [@First\_Name](https://meta.discourse.org/u/First_Name)
#### Post date: [October 11, 2024, 6:16pm UTC](https://meta.discourse.org/t/what-algorithm-does-2fa-use/330478/1 "2024-10-11T18:16:47Z")

</div>

My 2FA app doesn’t recognize Discourse, and I need to input the data myself before I can add the code. What algorithm is the 2FA? Is it HMAC SHA 1?

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [October 11, 2024, 7:33pm UTC](https://meta.discourse.org/t/what-algorithm-does-2fa-use/330478/2 "2024-10-11T19:33:34Z")

</div>

Yes. The equivalent oathtool command is

```plaintext
oathtool --totp -b «TOTPCODESTRING»

```

What are you using that it doesn’t recognise Discourse (presumably, it doesn’t recognise the QR code)?

Does it work with this?

 ![image](https://global.discourse-cdn.com/meta/original/4X/a/5/d/a5d1ebe292f323028963f712f9b06907f6490822.png)
