# Setup two factor authentication for GitLab

## Sign in

Go to [GitLab](https://gitlab.com/users/sign_in) to sign in

## Go to account settings

Click on **Edit profile** or **Preferences** to go to **User Settings.**

## Enable authentication

Go to **Account** and click on **Enable two-factor authentication.**

### **On your device (usually phone)**

Install a compatible app:

1. Cloud base (recommended because you can restore access if you lose the hardware device):
   * [Authy](https://authy.com/)
   * [Duo-mobile](https://duo.com/product/multi-factor-authentication-mfa/duo-mobile-app)
2. Other
   * [Google-Authenticator](https://support.google.com/accounts/answer/1066447?hl=en)
   * [Microsoft-Authenticator](https://www.microsoft.com/en-us/security/mobile-authenticator-app)

In your app, add a new entry in one of the two ways

* Scan the code provided by GitLab in with your device's camera to add it automatically.
* Enter the details provided to add the entry manually.

### **In GitLab**

Enter the six-digit number provided by your device's new entry into **Pin code.**

Download the recovery codes provided by GitLab before continue.

Click on **Proceed.**
