> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qa.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Choose how the agent signs in: credentials, email OTP, magic link, TOTP, API key, SMS, or BankID.

Store login data in [Configs](https://docs.qa.tech/core-concepts/configs.md) and attach the right config to each test. The agent uses those values when it hits a login form or needs a token. Prefer dedicated test accounts; config values are passed to the AI during runs.

If your preferred method is not listed below, tell us and we will consider it for the roadmap.

## Choose a method

| Method | Use when | Config / setup | Details |
| :- | :- | :- | :- |
| Username + password | Standard form login | Username + Password Credentials | [Configs](https://docs.qa.tech/core-concepts/configs.md) |
| Email + password | Email is the username | Valid Email + Password Login Credentials | [Configs](https://docs.qa.tech/core-concepts/configs.md) |
| OTP via email | One-time codes in email | Email Inbox config | [Email Inbox](https://docs.qa.tech/test-features/email-inbox.md) |
| Magic link | Passwordless email link | Project magic-link email (built in) | [Configs](https://docs.qa.tech/core-concepts/configs.md) |
| TOTP 2FA | Authenticator app codes | Username + Password with Two-Factor Authentication (otpauth URI) | [Configs](https://docs.qa.tech/core-concepts/configs.md) |
| API key | Header, query, or form token | API Key config | [Configs](https://docs.qa.tech/core-concepts/configs.md) |
| SMS OTP | Codes sent by SMS | SMS Phone Number config | [SMS Inbox](https://docs.qa.tech/test-features/sms-inbox.md) |
| BankID | Swedish BankID in staging | Stub or live-stream assist | [BankID](https://docs.qa.tech/applications/se-bank-id.md) |

Create configs under **Project Settings → Configs**, then add them on the test Settings tab. Field-level setup for each type lives on the [Configs](https://docs.qa.tech/core-concepts/configs.md) page. Environment-specific values use [Config Environment Overrides](https://docs.qa.tech/core-concepts/config-environment-overrides.md).

## Two-Factor Authentication (2FA)

For TOTP (Google Authenticator, Authy, and similar), create a **Username + Password Credentials - with Two-Factor Authentication** config and paste the full `otpauth://` URI from the account's QR code:

1. In your app, open 2FA setup for the test user until the QR code appears. Do not scan it with a phone.
2. Decode the QR (for example with [scanqr.org](https://scanqr.org/)) and copy the `otpauth://totp/...` URI.
3. Save that URI on the config in **Project Settings → Configs**. Field names are on [Configs](https://docs.qa.tech/core-concepts/configs.md).

During login the agent generates a fresh code from the URI. You do not need a step that says "enter the 2FA code."

## What we don't support

* **CAPTCHA challenges** — Most CAPTCHA types (reCAPTCHA, hCAPTCHA, and similar) are not supported.
* **BankID without a stub** — Production BankID is not automated end to end; use a staging stub or the [BankID](https://docs.qa.tech/applications/se-bank-id.md) live-stream flow.

> [!TIP]
>
> **Avoid CAPTCHA on staging:** Allowlist QA.tech IP addresses so tests are not
> blocked. Find them in [**Settings →
> Network**](https://app.qa.tech/dashboard/current-project/settings/network) and
> see [IP Access Control](https://docs.qa.tech/configuration/ip-access-control.md).

## Parallel runs and rate limits

When many tests log in at once, identity providers can rate-limit or invalidate sessions. Configure provider limits before scaling parallel plans. See [Authentication Rate Limits](https://docs.qa.tech/configuration/auth-rate-limits.md).

## Related

* [Test Data](https://docs.qa.tech/core-concepts/test-data.md) — overview of configs and related settings
* [Email Inbox](https://docs.qa.tech/test-features/email-inbox.md) — verification emails and OTP extraction
* [SMS Inbox](https://docs.qa.tech/test-features/sms-inbox.md) — leased phone numbers for SMS OTP
* [Crawling Sessions](https://docs.qa.tech/core-concepts/crawling.md) — crawl after login to map each user type


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.