> For the complete documentation index, see [llms.txt](https://docs.unitlab.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unitlab.ai/documentation/security/authentication-and-account-recovery.md).

# Authentication and account recovery

Sign in, turn on two-factor authentication, keep recovery codes, and reset a password.

## Sign in

Sign in with your email and password, or with **Sign in with Google**. If you forget your password, select **Forgot password?** on the sign-in page and follow the email link.

## Turn on two-factor authentication

Two-factor authentication (2FA) asks for a 6-digit code from an authenticator app each time you sign in. It works offline with any TOTP-compatible app, such as Google Authenticator, 1Password or Authy.

1. Open **Settings > Account security**.
2. Under **Two-factor authentication**, select **Enable 2FA**.
3. Scan the QR code with your authenticator app, or copy the setup key into it.
4. Enter the 6-digit code from the app to confirm.
5. Save the recovery codes somewhere safe, such as your password manager.

![Account security page with Change password, Two-factor authentication, Recovery keys and Danger Zone](https://292810646-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGjVLUz4wthGkGlRKM6rM%2Fuploads%2FXManZppi48wWm74TnsAP%2Faccount-security.webp?alt=media)

## Recovery codes

You get 10 recovery codes when you turn on 2FA. Each code works once, in place of a 6-digit code. Select **Use a recovery code instead** on the sign-in screen.

If you used most of them or think someone has seen them, select **Regenerate keys** under **Recovery keys**. The old codes stop working.

## Actions that ask for your second factor

With 2FA on, Unitlab asks for a 6-digit code or a recovery code before:

* changing your password,
* turning 2FA off,
* deleting your account,
* deleting a workspace.

## Delete your account

Open **Settings > Account security** and use **Delete Account** under **Danger Zone**. Type the confirmation phrase, then confirm with your password and, if 2FA is on, a 6-digit or recovery code.

A workspace you own is deleted with your account only if no other member has used it and it has no paid plan. If one of your workspaces doesn't meet this, the account is not deleted and nothing changes.

## Lost access to your authenticator

Use a recovery code to sign in, then turn 2FA off and on again with your new device. If you have no recovery codes left, contact Unitlab support from the email address on the account.

## Related

[Security overview](https://docs.unitlab.ai/documentation/security/security-overview.md) · [Sensitive data and offboarding](https://docs.unitlab.ai/documentation/security/sensitive-data-and-offboarding.md)
