![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
github.com/sumit-kumar-rai/2fa
2fa is a two-factor authentication agent.
Usage:
go get -u github.com/mailtosumitrai/2fa
2fa -add [-7] [-8] [-hotp] name
2fa -list
2fa [-clip] [-less] keyname
2fa -add name
adds a new key to the 2fa keychain with the given name. It
prints a prompt to standard error and reads a two-factor key from standard
input. Two-factor keys are short case-insensitive strings of letters A-Z and
digits 2-7.
By default the new key generates time-based (TOTP) authentication codes; the
-hotp
flag makes the new key generate counter-based (HOTP) codes instead.
By default the new key generates 6-digit codes; the -7
and -8
flags select
7- and 8-digit codes instead.
2fa -list
lists the names of all the keys in the keychain.
2fa name
prints a two-factor authentication code from the key with the
given name. If -clip
is specified, 2fa
also copies to the code to the system
clipboard.
With no arguments, 2fa
prints two-factor authentication codes from all
known time-based keys.
The default time-based authentication codes are derived from a hash of the key and the current time, so it is important that the system clock have at least one-minute accuracy.
The keychain is stored unencrypted in the text file $HOME/.2fa
unless another
path is provided via the -keychain
parameter or the KEYCHAIN
environment
variable.
During GitHub 2FA setup, at the “Scan this barcode with your app” step, click the “enter this text code instead” link. A window pops up showing “your two-factor secret,” a short string of letters and digits.
Add it to 2fa under the name github, typing the secret at the prompt:
$ 2fa -add github
2fa key for github: nzxxiidbebvwk6jb
$
Display all keys
$ 2fa
268346 | 19 second(s) left | github
$
Then whenever GitHub prompts for a 2FA code, run 2fa to obtain one:
$ 2fa github
22 second(s) left
581590
$
Or to get only code and copy to clipboard:
$ 2fa -less -clip github
581590
$
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.