Skip to content

2FA/multifactor auth: policy on requiring recovery codes #5586

@nlhkabu

Description

@nlhkabu

As part of the work that @woodruffw is doing on 2FA here, I would like to add the following questions / help text to https://pypi.org/help/

I am posting this text here to receive feedback prior to making a PR:


How do I access my PyPI account using two factor authentication?

Users who have chosen to set up two factor authentication (2FA) on their PyPI account must provide a second method of identity verification (other than their username and password) to log in.

PyPI supports two 2FA methods: Generating a code through a TOTP application, and using a U2F security key.

How do I generate a code through a TOTP application?

When enabling two factor authentication (2FA) via TOTP in your account admin, you were asked to provision an application (usually a mobile phone app) in order to generate authentication codes. Popular applications include:

Open the application of your choice to generate a code. If you have deleted your application or lost your phone, you can still authenticate using a security key (if you have set up this 2FA method), or bypass 2FA using a recovery code.

How do I login with a U2F key?

A universal second factor (U2F) key is hardware device that communicates via USB, NFC, or Bluetooth. Popular keys include Yubikey, Google Titan and Thetis. PyPI supports any FIDO U2F compatible key.

Users who have set up this second factor will be prompted to use their key (usually by inserting it into a USB port and pressing a button) when logging in.

If you have lost your U2F key, you can still authenticate using a TOTP application (if you have set up this 2FA method), or bypass 2FA using a recovery code.

What is a recovery code?

When setting up two factor authentication on your account, you were provided with the option to add a set of 8 recovery codes, and instructed to keep these in a safe place.

These codes are usually a string of numbers, letters or words that act as a one time password. If you are unable to login to PyPI using your normal second factor, you can use one of these codes to bypass the 2FA process. Once you have used a backup code, you cannot use it again.

It is important that you store these codes securely by either printing or writing down the codes - we strongly recommend that you do not store them in a password manager, or on any device.

If you lose your recovery codes, and cannot authenticate with one of your 2FA methods, you will be locked out of your PyPI account. The PyPI team can manually grant you access to your account under limited circumstances.


@woodruffw a couple of questions:

  1. is the FIDO link appropriate? Or should I link to a different page, with different text?
  2. is These codes are usually a string of numbers, letters or words that act as a one time password accurate? Or would it be better to say "These codes are made up of numbers, letters and symbols"? e.g. I think this text is currently too generic and should be updated based on what our actual recovery codes will look like.

Metadata

Metadata

Assignees

Labels

UX/UIdesign, user experience, user interface

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions