this post was submitted on 10 Jul 2023
78 points (96.4% liked)

Fediverse

28519 readers
426 users here now

A community to talk about the Fediverse and all it's related services using ActivityPub (Mastodon, Lemmy, KBin, etc).

If you wanted to get help with moderating your own community then head over to !moderators@lemmy.world!

Rules

Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration), Search Lemmy

founded 2 years ago
MODERATORS
 

Given the recent attack, I think this is a good opportunity to remind of the importance of using 2FA.

(although it doesn't appear to make any difference in this case as session cookies were being exploited so login credentials were not needed)

But for me at least, this event has made me go back and take another shot at setting up 2FA.

I am happy to report I finally got it working on all my Lemmy accounts/instances, so I thought I'd share some tips:

  • I still haven't figured out how to set up via desktop, use a mobile browser.
  • Follow these steps:
    • Check the enable 2fa box on your account settings and click Save
    • A message will show about a button appearing when the page refreshes
    • The button usually doesn't appear for me at first.
    • You can simply manually refresh the page at this point to make the button appear
    • The button should now be visible. Click the button.
    • This opens a otpauth:// link which on a mobile device should be handled by a 2FA app if you have one installed.
  • Authy does not work: It will generate a code happily but that code will not work when you try to login to your Lemmy account.
  • Google Authenticator worked for me. It appears the type of TOTP code Lemmy is using is not compatible with some authenticator apps.
  • I think if you can find a desktop app that registers as a provider for the otpauth:// links it may be possible to do on desktop as well.
  • You can also pull the secret= value from the link to manually add it to an authenticator on/from desktop.

After several failed attempts previously, I finally figured out Authy was the problem and I have now secured all my Lemmy accounts with 2FA. Annoying that I have to use GA, but that appears to be an Authy issue not a Lemmy one.

2FA might not have made any difference today but it very well might in the future.

Stay safe everyone! πŸ”

top 30 comments
sorted by: hot top controversial new old
[–] clothes@lemmy.world 30 points 1 year ago (2 children)

It may not be wise to enable 2FA until Lemmy fixes the implementation. It's currently very easy to get permanently locked out of your account, through no fault of your own. Especially if you don't have an email address linked to your account.

[–] Rootiest@lemmy.world 3 points 1 year ago (1 children)

If you are concerned, I would suggest keeping another browser/device/etc logged in when trying to enable 2FA.
Then if the 2FA activation fails, you can use that second session (which does not get logged out when you enable 2FA) to then disable it again.

[–] clothes@lemmy.world 3 points 1 year ago

For sure! But I don't think non-advanced users should be enabling 2FA right now. It's puzzling that Lemmy pushed the feature in its current state to production.

[–] qwet@kbin.social 2 points 1 year ago (1 children)

This happened to me. I was going to try it and when I saw that the option wasn't what I expected, I intended to close it, but I guess either I didn't or it's buggy because it's enabled now and there's no encryption key, so no way to login. Then the server logged everyoner out cause of the hack. This was on lemmy.world, btw, I have an account on kbin too.

I sent an email, but no word yet obviously. I'm sure they're busy.

[–] clothes@lemmy.world 1 points 1 year ago

Jeez, that sucks. Hope you get back in soon!

[–] JaffaBoy@lemmy.world 17 points 1 year ago (1 children)

Got to say the fact there are no backup codes and you can reset your password and disable 2FA without confirming it's you by using your 2FA makes this protection pretty poor

[–] Rootiest@lemmy.world 4 points 1 year ago* (last edited 1 year ago) (1 children)

Yeah it needs some love, but I still think it's better to have than not.

It's not less secure than a password alone.

[–] JaffaBoy@lemmy.world 1 points 1 year ago

that is very true

[–] joolez@discuss.tchncs.de 7 points 1 year ago* (last edited 1 year ago)

Additionally it needs QR-Code Support, Backup-Codes and disabling only after double-check of your current password.

I think the missing QR-Code is a main flaw that holds non tech savvy people back from using it at all.

[–] mawp@lemmy.world 6 points 1 year ago

2FA feels very half-baked atm.

Tried to set it up and got locked out, but apparently you can get around 2FA by simply requesting a password reset...

That seems like a massive security flaw, and essentially makes 2FA non-existent atm.

[–] hatchback8051@lemmy.world 5 points 1 year ago

Aegis worked well as a 2fa app for me.

[–] baronvonj@lemmy.world 4 points 1 year ago

On desktop browser, you have to right-click the button and copy the link, which can then be posted into an app the takes the otpauth URI.

[–] Rooki@lemmy.world 3 points 1 year ago

OTP doesnt work! Please keep at least 1 device logged in a browser! I almost locked me out, because the otp didnt worked.

[–] Kaan@lemmy.kweb.ovh 3 points 1 year ago

If you paste the entire URL it gives you, bitwarden also works.

I look forward to the day when FIDO2 (YubiKey) and passkeys are supported.

[–] setsubyou@lemmy.world 2 points 1 year ago

On desktop macOS the link just works with the built-in thing.

In 1password (probably regardless of what it's running on?), if it's not registered as a handler for the URL scheme, one can add an OTP field to the login item for lemmy manually and then copy-paste the entire setup link into the field.

[–] Brendan@lemmy.world 2 points 1 year ago (2 children)

Is there a way to get backup codes? I enabled 2FA, but I don’t see anywhere to generate them.

[–] hatchback8051@lemmy.world 2 points 1 year ago* (last edited 1 year ago) (1 children)

I couldn't find backup codes but I was able to perform a password reset which logged me in and let me disable or reconfigure 2fa.

[–] Brendan@lemmy.world 1 points 1 year ago

Seems strange that you could remove 2FA without being forced to authenticate via 2FA first.

[–] Rootiest@lemmy.world 1 points 1 year ago (1 children)

As far as I can tell, no. There's no backup codes and there's no "verification" of the codes when you enable it.

Also, you do not get logged out of any other sessions even if they were logged in before 2FA was enabled.
So I typically leave my desktop browser logged in as a backdoor in case something goes wrong I can use that session to re-disable 2FA.
Then once I have verified it working on mobile I will sign out the desktop browser and sign it back in with the 2FA key.

But yeah, no backup codes. Apparently an admin can disable 2FA on your account if you get locked out, or so I have heard.

[–] clothes@lemmy.world 1 points 1 year ago

You may want to add a warning to your post. For instances that don't require an email address, it's currently quite easy to get permanently locked out of your account because the code is never verified.

[–] Rooki@lemmy.world 2 points 1 year ago

Microsoft authenticator doesnt work!

[–] aussiematt@lemm.ee 1 points 1 year ago

The TOTP feature in Bitwarden works, if you paste in the whole otpauth:// URI to Bitwarden's Authenticator Key (TOTP) field. The URL specifies that the hashing algorithm should be SHA256. If you just import the secret= value into Authy, it probably defaults to using the SHA-1 algorithm, which may be why the codes generated by Authy don't work.

SHA256 is more secure than SHA-1, which I guess is why Lemmy has chosen to use it for its 2FA feature.

[–] SirPorthos@lemmy.world 1 points 1 year ago

I cant wait for email based 2 factor authentication to be implemented. Or then Authy can finally work.

[–] th3dogcow@lemmy.world 1 points 1 year ago

Saw the same bug with the button not appearing until you manually refresh the page.

On iPhone it was super simple. Clicking the link opened iOS’s built in password manager, which was compatible and could generate the codes automatically.

[–] joat_mon@lemmy.world 1 points 1 year ago

Thanks for the info. andOTP authenticator works perfectly.

[–] morethanevil@lmy.mymte.de 1 points 1 year ago (1 children)

I would like to know, how it works with the Yubikey OTP Generator. I have 2 Yubikeys and want to use the secret with both keys. Is this possible? Do somebody know something about it?

[–] morethanevil@lmy.mymte.de 1 points 1 year ago

Okay I use a "workaround" with Bitwarden. Yubikeys secure Bitwarden and Bitwarden provides 2FA for Lemmy. So I can use Yubikeys for 2FA

[–] jacktherippah@lemmy.world 1 points 1 year ago

Using Authenticator Pro on Android. Working well for me.

load more comments
view more: next β€Ί