Using two-factor authentication verifies a user’s identity with two methods, adding extra security to ensure only authorized individuals can access an account, even if the password is compromised.
If you choose to enable two-factor authentication, at every login you will need to provide:
To enable Two-factor Authentication with a one-time password:
On the Hugging Face Hub:
On your device (usually your phone):
In Hugging Face Hub:
If you entered the correct pin, the Hub displays a list of recovery codes. Download them and keep them in a safe place.
Right after you’ve successfully activated 2FA with a one-time password, you’re requested to download a collection of generated recovery codes. If you ever lose access to your one-time password authenticator, you can use one of these recovery codes to log in to your account.
If you lose the recovery codes, or want to generate new ones, you can use the Authentication settings page.
To regenerate 2FA recovery codes:
When you sign in with 2FA enabled, the process is only slightly different than the standard sign-in procedure. After entering your username and password, you’ll encounter an additional prompt, depending on the type of 2FA you’ve set up. When prompted, provide the pin from your one-time password authenticator’s app or a recovery code to complete the sign-in process.
To disable 2FA:
This clears all your 2FA registrations.
If you no longer have access to your authentication device, you can still recover access to your account:
To use a recovery code:
After you use a recovery code, you cannot re-use it. You can still use the other recovery codes you saved.
In case you’ve forgotten your password and lost access to your two-factor authentication credentials, you can reach out to support (website@huggingface.co) to regain access to your account. You’ll be required to verify your identity using a recovery authentication factor, such as an SSH key or personal access token.