Generate a new recovery code
If you have lost your two-factor authentication recovery code and still have access to your Docker Hub account, you can generate a new recovery code.
- Sign in to your Docker account.
- Select your avatar and then from the drop-down menu, select Account settings.
- Navigate to the Security section, then select Manage Two-Factor Authentication.
- Enter your password, then select Confirm.
- Select Generate new code.
This generates a new code. Select the visibility icon to view the code. Remember to save your recovery code and store it somewhere safe.