Skip to content

Two-factor authentication #1210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Feb 7, 2024
Merged

Two-factor authentication #1210

merged 12 commits into from
Feb 7, 2024

Conversation

Kakulukian
Copy link
Member

No description provided.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@@ -280,6 +280,8 @@
sections:
- local: security-tokens
title: User Access Tokens
- local: security-two-factor-authentication
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- local: security-two-factor-authentication
- local: security-mfa

shorter?

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.

To complete your recovery request, you'll need to confirm an alternative authentication factor. Choose a recovery verification method:
- If you've previously established an SSH key on this account, provide your public SSH key
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that there was an open issue (by @severo i think) to expose any user's SSH public keys

So in that case anyone would have this

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just keep the very first line of this section for now I think :)

@@ -0,0 +1,99 @@
# Two-Factor Authentication

Implementing two-factor authentication is a method of verifying a user's identity by using two separate authentication methods. This extra layer of security ensures that only authorized individuals can access an account, even if the password has been compromised.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this sounds a bit complex/verbose, let's simplify it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Implementing two-factor authentication is a method of verifying a user's identity by using two separate authentication methods. This extra layer of security ensures that only authorized individuals can access an account, even if the password has been compromised.
Adding an additional authentication factor ensures that only authorized individuals can access your account, even if the password has been compromised.

?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or even ... only you can access your account, even if your password has been compromised

Copy link
Member

@Pierrci Pierrci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Kakulukian!! 🙏

@@ -0,0 +1,99 @@
# Two-Factor Authentication

Implementing two-factor authentication is a method of verifying a user's identity by using two separate authentication methods. This extra layer of security ensures that only authorized individuals can access an account, even if the password has been compromised.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Implementing two-factor authentication is a method of verifying a user's identity by using two separate authentication methods. This extra layer of security ensures that only authorized individuals can access an account, even if the password has been compromised.
Adding an additional authentication factor ensures that only authorized individuals can access your account, even if the password has been compromised.

?

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.

To complete your recovery request, you'll need to confirm an alternative authentication factor. Choose a recovery verification method:
- If you've previously established an SSH key on this account, provide your public SSH key
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just keep the very first line of this section for now I think :)

Kakulukian and others added 3 commits February 6, 2024 10:47
Co-authored-by: Pierric Cistac <Pierrci@users.noreply.github.com>
@@ -0,0 +1,99 @@
# Two-Factor Authentication

Implementing two-factor authentication is a method of verifying a user's identity by using two separate authentication methods. This extra layer of security ensures that only authorized individuals can access an account, even if the password has been compromised.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or even ... only you can access your account, even if your password has been compromised

To enable Two-factor Authentication with a one-time password:

In the Hugging Face Hub:
1. Go to your [Authentication settings](https://hf.co/settings/authentication)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not live yet, is it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, but soon

Kakulukian and others added 2 commits February 6, 2024 12:30
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
@Kakulukian Kakulukian marked this pull request as ready for review February 6, 2024 13:17
Copy link
Member

@Pierrci Pierrci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last two nits, LGTM, thanks so much @Kakulukian!

Kakulukian and others added 2 commits February 7, 2024 11:09
Co-authored-by: Pierric Cistac <Pierrci@users.noreply.github.com>
@Kakulukian Kakulukian merged commit c57c1b7 into main Feb 7, 2024
@Kakulukian Kakulukian deleted the two-factor-auth-docs branch February 7, 2024 10:17
Copy link
Contributor

@SBrandeis SBrandeis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol you merge too fast

Mostly wording nits

Comment on lines +5 to +7
If you choose to enable two-factor authentication, at every login you will need to provide:
- Username or email & password (normal login credentials)
- One-time security code via app
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(maybe)

Suggested change
If you choose to enable two-factor authentication, at every login you will need to provide:
- Username or email & password (normal login credentials)
- One-time security code via app
If you choose to enable two-factor authentication, at every login you will need to provide:
- Your username & password (the usual login credentials)
- A one-time security code generated with an app


To enable Two-factor Authentication with a one-time password:

In the Hugging Face Hub:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to precise IMO (we're already in the Hub documentation)

Suggested change
In the Hugging Face Hub:

Comment on lines +23 to +25
2. In the application, add a new entry in one of two ways:
- Scan the code displayed on screen Hub with your device’s camera to add the entry automatically
- Enter the details provided to add the entry manually
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. In the application, add a new entry in one of two ways:
- Scan the code displayed on screen Hub with your device’s camera to add the entry automatically
- Enter the details provided to add the entry manually
2. In the application, add a new entry in one of two ways:
- Scan the QR code displayed on screen with your device’s camera
- Enter the details provided to add the entry manually

- Scan the code displayed on screen Hub with your device’s camera to add the entry automatically
- Enter the details provided to add the entry manually

In Hugging Face Hub:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In Hugging Face Hub:
To finalize the setup, on the Hugging Face Hub:


In Hugging Face Hub:
1. Enter the six-digit pin number from your authentication device into "Code"
2. Save
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. Save
2. Click the save button

<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/two-fa/settings-dark.png" />
</div>

If you entered the correct pin, the Hub displays a list of recovery codes. Download them and keep them in a safe place.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you entered the correct pin, the Hub displays a list of recovery codes. Download them and keep them in a safe place.
If you entered the correct pin, the Hub displays a list of recovery codes. Make sure you keep them in a safe place: they allow recovering access to your account if you ever lose access to the 2FA device.


## Recovery codes

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
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 device, you can use one of these recovery codes to log in to your account.

3. Click on Regenerate recovery codes

<Tip warning={true}>
If you regenerate 2FA recovery codes, save them. You can’t use any previously created recovery codes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you regenerate 2FA recovery codes, save them. You can’t use any previously created recovery codes.
Regenerating 2FA recovery codes invalidates the previous ones, meaning you will not be able to use them anymore. We recommend you save the newly generated codes somewhere safe.

1. Access your [Authentication settings](https://hf.co/settings/authentication)
2. Click on "Remove".

This clears all your 2FA registrations.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not super clear IMO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants