<!-- https://qasignoff.com/docs/core-features/authentication/ -->
# Authentication

* **Platform Availability:** Windows App · VS Code Extension (shared shell)
* **Overview:** Configure auth per request or inherit from folder/collection. OAuth 1.0 and 2.0, Digest, NTLM, AWS SigV4 and Hawk are all supported.

![Auth tab with a masked Bearer token and a 200 response](/docs/assets/screenshots/app/request-auth.webp)

## Supported types

| Type | Notes |
|------|-------|
| none | No auth headers |
| inherit | Use parent folder/collection auth |
| bearer | `Authorization: Bearer …` |
| basic | Username / password |
| api-key | Header or query placement |
| oauth2 | Get a token with authorization code + PKCE or client credentials, and refresh it. For password and implicit grants, paste a token you already have |
| oauth1 | Signed with HMAC-SHA1, HMAC-SHA256, RSA-SHA1 or PLAINTEXT |
| digest | Digest challenge-response (MD5 and SHA-256, including the `-sess` variants) |
| aws-signature | AWS SigV4 signing |
| hawk | Hawk auth |
| ntlm | NTLMv2 three-step handshake |
| custom | Custom header injection |

## How It Works (Windows App)

1. Open a request → **Auth** tab (or set collection/folder Authorization).
2. Choose type and fill fields.
3. For OAuth2 authorization code, SignOff Studio can start a local callback listener via the desktop host.
4. Send the request; inspect response Auth-related headers as needed.

## How It Works (VS Code Extension)

1. Same Auth tab in the webview.
2. OAuth local callback is handled by the VS Code host (`oauth-local-callback`).

![Auth tab with a masked Bearer token and a 200 response](/docs/assets/screenshots/app/request-auth.webp)

## Code / Configuration Examples

Bearer:

```http
Authorization: Bearer {{token}}
```

API key header:

```http
X-API-Key: {{apiKey}}
```

OAuth2 client credentials (fields in UI):

```json
{
  "type": "oauth2",
  "grantType": "client_credentials",
  "accessTokenUrl": "https://auth.example.com/oauth/token",
  "clientId": "{{clientId}}",
  "clientSecret": "{{clientSecret}}",
  "scope": "api.read"
}
```

## Edge Cases, Troubleshooting & Pro-Tips

- Prefer **inherit** at collection level for microservice suites.
- Store tokens in environment **Secrets**, not plain Variables.
- PKCE is recommended for public clients using authorization_code.
- If there is a refresh token, SignOff Studio refreshes an expired token, or one rejected with HTTP 401, and retries the request once.
- OAuth 2.0 tokens are saved in the request's auth settings in the collection file. Check for them before you commit that file.

## Next

- [Requests](/docs/core-features/requests/)
- [Environments](/docs/core-features/environments/)
