Tiny Core Linux

Off-Topic => Off-Topic - Tiny Core Lounge => Topic started by: curaga on August 29, 2023, 01:49:02 AM

Title: Github 2FA
Post by: curaga on August 29, 2023, 01:49:02 AM
I got the email that I need to set up 2FA in 45 days to continue using github. I had read that Github does it right, not requiring your phone number or a smartphone, and indeed it was so.

I built a command-line totp tool:
https://github.com/fmount/c_otp

Github when setting up TOTP by default gives a QR code, but there is a link to get the actual code too. I put that to a file, say ~/.totpcodes:
Code: [Select]
github:blahblah
Now when github asks for the 2FA key, I just run "c_otp -f ~/.totpcodes" and it gives the numbers. No smartphone crap, no SMS.

I did have to correct my computer's time, TOTP fails if the time is wrong by more than 1-2min, my clock was off by 4 minutes. I also printed out the recovery codes, to have an offline copy for accessing the account if my disk fails.
Title: Re: Github 2FA
Post by: jazzbiker on December 13, 2023, 12:03:36 PM
@curaga, thanks a lot!