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

# 인증

> Claude Code에 로그인하고 개인, 팀, 조직을 위한 인증을 구성합니다.

Claude Code는 설정에 따라 여러 인증 방법을 지원합니다. 개별 사용자는 claude.ai 계정으로 로그인할 수 있으며, 팀은 Claude for Teams 또는 Enterprise, Claude Console, 또는 Amazon Bedrock, Google Cloud의 Agent Platform, Microsoft Foundry와 같은 클라우드 제공자를 사용할 수 있습니다.

## Claude Code에 로그인

[Claude Code를 설치](https://code.claude.com/docs/ko/setup.md#install-claude-code)한 후 터미널에서 `claude`를 실행합니다. 처음 실행할 때 Claude Code는 로그인할 수 있도록 브라우저 창을 엽니다. 단, 다음과 같은 경우에는 로그인 프롬프트를 건너뛸 수 있습니다:

* **API 키**: `ANTHROPIC_API_KEY` 환경 변수를 설정했고 Claude Code가 해당 키를 사용할지 물을 때 키를 승인한 경우
* **이전 로그인**: 첫 세션 전에 셸에서 [`claude auth login`](https://code.claude.com/docs/ko/cli-reference#cli-commands)을 실행했거나, 자격 증명을 [볼륨](https://code.claude.com/docs/ko/devcontainer.md#persist-authentication-and-settings-across-rebuilds)에 보관하는 개발 컨테이너를 다시 빌드한 경우. 그래도 로그인 프롬프트가 표시되면 [원인을 확인](#login-prompt-still-appears-after-an-earlier-sign-in)합니다.

브라우저가 자동으로 열리지 않으면 `c`를 눌러 로그인 URL을 클립보드에 복사한 후 브라우저에 붙여넣습니다.

브라우저에서 로그인 후 리디렉션 대신 로그인 코드를 표시하면 터미널의 `Paste code here if prompted` 프롬프트에 붙여넣습니다.

로그인이 완료되면 터미널에 `Login successful`이 표시되고 `Enter`를 눌러 계속하라는 메시지가 나타납니다.

다음 계정 유형 중 하나로 인증할 수 있습니다:

* **Claude Pro, Max 또는 Ultra 구독**: claude.ai 계정으로 로그인합니다. [claude.com/pricing](https://claude.com/pricing?utm_source=claude_code\&utm_medium=docs\&utm_content=authentication_pro_max)에서 구독합니다.
* **Claude for Teams 또는 Enterprise**: 팀 관리자가 초대한 claude.ai 계정으로 로그인합니다.
* **Claude Console**: [Console 자격 증명](#claude-console-authentication)으로 로그인합니다. [API 키를 생성](#sign-in-without-an-api-key)하거나 생성하지 않고 로그인할 수 있습니다.
* **클라우드 제공자**: [Amazon Bedrock](https://code.claude.com/docs/ko/amazon-bedrock.md), [Google Cloud의 Agent Platform](https://code.claude.com/docs/ko/google-vertex-ai.md), 또는 [Microsoft Foundry](https://code.claude.com/docs/ko/microsoft-foundry.md)를 사용하는 경우 `claude`를 실행하기 전에 필요한 환경 변수를 설정합니다. 로그인 프롬프트에서 **3rd-party platform**을 선택할 수도 있으며, 이를 선택하면 Bedrock 및 Agent Platform에 대한 대화형 설정 마법사가 시작됩니다.
* **Cloud gateway**: 조직에서 자체 호스팅 [Claude 앱 게이트웨이](https://code.claude.com/docs/ko/claude-apps-gateway)를 실행하는 경우 `/login`을 통해 또는 [VS Code에서](https://code.claude.com/docs/ko/vs-code.md#sign-in-to-a-claude-apps-gateway) 회사 SSO로 로그인합니다. 게이트웨이에서 발급한 토큰이 세션의 유일한 자격 증명입니다.
* **Enterprise Admin Console**: Owner가 조직의 제공자 또는 게이트웨이에 대해 [이 로그인 방식을 켠](https://claude.com/docs/third-party/claude-desktop/admin-console-claude-code#turn-on-sign-in-from-claude-code) 경우 셸에서 `claude auth login`을 실행하고 브라우저에서 조직을 선택합니다. 확인하려면 터미널에서 `Signed in to the organization`이 표시되는지 확인합니다. 필요한 Claude Code 버전은 [시작하기 전에](https://claude.com/docs/third-party/claude-desktop/admin-console-claude-code#before-you-start)를 참조합니다.

관리자는 개발자가 사용하는 로그인 방법을 지정할 수 있으며 claude.ai 로그인이 특정 조직에 속하도록 요구할 수 있습니다. [조직에 대한 로그인 제한](#restrict-login-to-your-organization)을 참조합니다.

로그아웃하고 다시 인증하려면 Claude Code 프롬프트에서 `/logout`을 입력합니다. 로그아웃하면 첫 실행 설정 상태도 재설정되므로 다음에 `claude`를 실행할 때 로그인 및 설정을 다시 진행합니다.

로그인에 문제가 있으면 [인증 문제 해결](https://code.claude.com/docs/ko/troubleshoot-install.md#login-and-authentication)을 참조합니다.

### 이전에 로그인했는데도 로그인 프롬프트가 표시되는 경우

이전에 로그인했는데 첫 실행 설정에서 로그인 프롬프트를 [건너뛰지](#log-in-to-claude-code) 않고 표시한다면 다음과 같은 원인을 확인합니다:

* **만료된 로그인**: 이전 로그인이 만료되었고 Claude Code가 이를 갱신할 수 없습니다. 프롬프트에서 다시 로그인합니다.
* **조직으로 제한된 로그인**: 관리자가 관리형 설정에서 [`forceLoginOrgUUID`](https://code.claude.com/docs/ko/settings-reference#forceloginorguuid)를 설정하여 [특정 조직의 로그인을 요구](#restrict-login-to-your-organization)하고 있습니다. 이 경우 계정이 해당 조직 중 하나에 속하는지와 관계없이 프롬프트가 표시됩니다. 필수 조직에 속한 계정으로 로그인합니다. 해당 계정이 없으면 관리자에게 추가를 요청합니다.
* **필수 로그인 방법**: 현재 로그인이 설정 파일의 [`forceLoginMethod`](https://code.claude.com/docs/ko/settings-reference#forceloginmethod)에서 요구하는 종류가 아닙니다. `"claudeai"`로 설정된 경우 이전 Claude Console 로그인의 API 키는 기존 로그인으로 인정되지 않습니다. `"console"`로 설정된 경우 claude.ai 계정은 인정되지 않습니다. 해당 설정에서 지정한 종류의 계정으로 로그인합니다.
* **이전 버전**: v2.1.290 이전에는 로그인 여부와 관계없이 설정 중에 프롬프트가 표시되었습니다. 프롬프트를 건너뛰려면 [Claude Code를 업데이트](https://code.claude.com/docs/ko/setup.md#update-claude-code)합니다.

### 여러 계정으로 로그인

작업 계정과 개인 계정 같은 여러 계정에 동시에 로그인 상태를 유지하려면 각 계정에 자체 구성 디렉터리를 제공합니다. `claude`를 시작할 때 사용하려는 계정의 디렉터리로 [`CLAUDE_CONFIG_DIR`](https://code.claude.com/docs/ko/env-vars#variables) 환경 변수를 설정합니다. 각 디렉터리에는 자체 설정, 세션 기록 및 claude.ai 로그인 또는 API 키가 있습니다. 예를 들어 Bash 또는 Zsh에서 `~/.bashrc` 또는 `~/.zshrc`에 이 별칭을 추가하면 `claude-work`는 작업 계정을 사용하고 `claude`는 개인 계정을 유지합니다:

```bash theme={null}
alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'
```

새 터미널을 열고 처음으로 `claude-work`를 실행한 후 Claude Code는 새 디렉터리에 대한 로그인 및 설정을 진행합니다. 별도의 디렉터리는 Claude Code가 해당 종류의 로그인을 구성 디렉터리 외부에 저장하기 때문에 Claude Console 로그인 두 개를 [API 키 없이](#sign-in-without-an-api-key) 분리하지 않습니다.

## 팀 인증 설정

팀 및 조직의 경우 다음 방법 중 하나로 Claude Code 액세스를 구성할 수 있습니다.

* [Claude for Teams 또는 Enterprise](#claude-for-teams-or-enterprise), 대부분의 팀에 권장됨
* [Claude Console](#claude-console-authentication)
* [Claude apps gateway](https://code.claude.com/docs/ko/claude-apps-gateway), 개발자를 IdP로 로그인하고 구성한 클라우드 공급자로 추론을 라우팅하는 자체 호스팅 게이트웨이
* [Amazon Bedrock](https://code.claude.com/docs/ko/amazon-bedrock.md)
* [Google Cloud's Agent Platform](https://code.claude.com/docs/ko/google-vertex-ai.md)
* [Microsoft Foundry](https://code.claude.com/docs/ko/microsoft-foundry.md)

### Claude for Teams 또는 Enterprise

[Claude for Teams](https://claude.com/pricing?utm_source=claude_code\&utm_medium=docs\&utm_content=authentication_teams#team-&-enterprise) 및 [Claude for Enterprise](https://anthropic.com/contact-sales?utm_source=claude_code\&utm_medium=docs\&utm_content=authentication_enterprise)는 Claude Code를 사용하는 조직에 최고의 경험을 제공합니다. 팀 멤버는 중앙 집중식 청구 및 팀 관리를 통해 Claude Code와 웹의 Claude에 모두 액세스할 수 있습니다.

* **Claude for Teams**: 협업 기능, 관리 도구, SSO, 청구 관리 및 조직 전체 Claude Code 구성을 위한 [서버 관리 설정](https://code.claude.com/docs/ko/server-managed-settings.md)이 포함된 셀프 서비스 플랜입니다. 소규모 팀에 최적입니다.
* **Claude for Enterprise**: 도메인 캡처, 역할 기반 권한 및 규정 준수 API를 추가합니다. 보안 및 규정 준수 요구 사항이 있는 대규모 조직에 최적입니다.

**1. 구독**

[Claude for Teams](https://claude.com/pricing?utm_source=claude_code\&utm_medium=docs\&utm_content=authentication_teams_step#team-&-enterprise)를 구독하거나 [Claude for Enterprise](https://anthropic.com/contact-sales?utm_source=claude_code\&utm_medium=docs\&utm_content=authentication_enterprise_step)에 대해 영업팀에 문의하세요.

**2. 팀 멤버 초대**

관리자 대시보드에서 팀 멤버를 초대하세요.

**3. 설치 및 로그인**

팀 멤버는 Claude Code를 설치하고 claude.ai 계정으로 로그인합니다.

### Claude Console 인증

API 기반 청구를 선호하는 조직의 경우 Claude Console을 통해 액세스를 설정할 수 있습니다.

**1. Console 계정 생성 또는 사용**

기존 Claude Console 계정을 사용하거나 새 계정을 만드세요.

**2. 사용자 추가**

다음 두 가지 방법 중 하나로 사용자를 추가할 수 있습니다.

* [platform.claude.com/settings/members](https://platform.claude.com/settings/members)의 Console Members 페이지에서 사용자를 일괄 초대: **Invite to organization** 클릭
* [SSO 설정](https://support.claude.com/en/articles/13132885-setting-up-single-sign-on-sso)

**3. 역할 할당**

사용자를 초대할 때 다음 중 하나를 할당하세요.

* **Claude Code** 역할: 사용자는 Claude Code API 키만 생성할 수 있습니다.
* **Developer** 역할: 사용자는 모든 종류의 API 키를 생성할 수 있습니다.

**4. 사용자가 설정 완료**

초대된 각 사용자는 다음을 수행해야 합니다.

* Console 초대 수락
* [시스템 요구 사항 확인](https://code.claude.com/docs/ko/setup.md#system-requirements)
* [Claude Code 설치](https://code.claude.com/docs/ko/setup.md#install-claude-code)
* Console 계정 자격 증명으로 로그인

#### API 키 없이 로그인

조직에서 개발자가 API 키를 생성하도록 허용하지 않는 경우에도 API 키를 생성하지 않고 Console 계정에 로그인할 수 있습니다. `/login` 프롬프트에서 Anthropic Console 계정을 선택하면 Claude Code가 로그인 방법을 묻습니다. Claude Code v2.1.242 이상이 필요합니다. 두 경로 모두 브라우저에서 Console에 로그인하며 Claude Code가 이후에 저장하는 내용이 다릅니다.

* **Console 계정으로 로그인**, `(recommended)` 레이블: Claude Code는 해당 로그인의 OAuth 토큰을 유지하고 [Anthropic 프로필](#anthropic-profiles-and-federation-credentials)로 저장합니다. API 키를 생성하지 않습니다.
* **API 키 생성**, `(legacy)` 레이블: Claude Code는 Console API 키를 생성하고 다른 자격 증명과 함께 저장합니다.

실제로 프로필은 OAuth 로그인을 저장하고 API 키는 정적 자격 증명입니다. Claude Code는 프로필의 로그인을 자동으로 새로 고치며, 새로 고침이 실패하면 다시 로그인할 때까지 [Anthropic 프로필 로그인 만료됨](https://code.claude.com/docs/ko/errors.md#anthropic-profile-login-expired)으로 요청이 실패합니다.

다음의 경우에는 키 없는 옵션이 표시되지 않습니다.

* [Amazon Bedrock, Google Cloud's Agent Platform 또는 Microsoft Foundry](https://code.claude.com/docs/ko/third-party-integrations.md) 또는 [Claude Platform on AWS](https://code.claude.com/docs/ko/claude-platform-on-aws.md)와 같은 클라우드 공급자에 대해 실행합니다.
* 어떤 설정 파일이든 [`forceLoginOrgUUID`](#restrict-login-to-your-organization)를 설정하거나 `forceLoginMethod`를 `"claudeai"`로 설정합니다.
* `forceLoginMethod`가 `"console"`이고 어떤 설정 파일도 `forceLoginOrgUUID`를 설정하지 않는 경우이며, 로그인에 실패한 후 오류 화면에서 재시도하기 전까지 적용됩니다.
* 관리형 설정 파일, MDM 프로필 또는 캐시된 서버 관리 설정과 같은 머신의 관리형 설정 소스가 존재하지만 Claude Code가 [읽을 수 없으며](https://code.claude.com/docs/ko/managed-settings.md#invalid-entries-in-managed-settings) 다른 관리형 소스가 정책을 제공하지 않습니다.

키 없이 로그인하기 전에 `ANTHROPIC_API_KEY`를 설정 해제하세요.

키 없이 로그인한 후에는 저장된 API 키 대신 프로필이 있습니다.

* **작성하는 프로필**: Claude Code는 `ANTHROPIC_PROFILE`로 명명된 프로필, 활성 프로필 또는 `default`를 작성합니다. 해당 프로필이 페더레이션 프로필인 경우 Claude Code는 덮어쓰지 않고 로그인을 거부합니다.
* **로그아웃되는 대상**: Claude Code는 머신에 저장된 모든 claude.ai 로그인에서 로그아웃합니다.
* **실행 취소 방법**: `/logout`을 실행하면 이 로그인이 작성한 자격 증명이 제거되고 취소됩니다.

프로필에 대한 다른 모든 것이 이 로그인에 적용되며, 여기에는 다른 자격 증명에 대한 순위, `/status`에서 얻는 `Profile` 행 및 claude.ai 로그인이 필요한 기능이 포함됩니다. [Anthropic 프로필 및 페더레이션 자격 증명](#anthropic-profiles-and-federation-credentials)을 참조하세요.

#### 관리형 머신에서 키 없는 로그인 제공 중지

Claude Code가 [키 없는 로그인](#sign-in-without-an-api-key)을 제공하지 않도록 하려면 장치 관리 도구를 사용하여 [관리형 설정](https://code.claude.com/docs/ko/managed-settings.md)의 [`forceLoginOrgUUID`](https://code.claude.com/docs/ko/settings-reference#forceloginorguuid)를 각 개발자의 머신에 배포하세요. 이 값을 [Console 조직 ID](https://platform.claude.com/settings/organization)로 설정하세요. 배포하기 전에 각 개발자에게 [API 키를 생성할 수 있는 역할](#claude-console-authentication)이 있는지 확인하세요. 배포한 후에는 해당 역할이 없는 개발자는 `/login`에서 Console에 로그인할 수 없습니다.

`forceLoginMethod`만 `"console"`로 설정된 경우 개발자는 실패한 로그인을 재시도하여 키 없는 옵션을 선택할 수 있습니다. `forceLoginOrgUUID`가 배포되면 로그인 화면에서 해당 옵션이 제거되지만, 개발자는 이미 보유하고 있거나 [`ant auth login`](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/authentication)으로 생성하는 [Anthropic 프로필](#anthropic-profiles-and-federation-credentials)을 여전히 사용할 수 있습니다. 배포한 후에는 각 머신에서 다음 자격 증명과 로그인을 처리하세요.

* **키 없는 로그인**: 개발자를 API 키로 전환하려면 로그아웃한 다음 Console에 다시 로그인하도록 하세요. 이때 키가 생성됩니다. 키 없는 로그인의 경우 셸에서 `claude auth logout`을 실행합니다. `ant auth login` 프로필의 경우 `ant auth logout`을 실행합니다. 프로필과 API 키가 모두 머신에 있으면 Claude Code가 세션을 거부하므로 먼저 로그아웃해야 합니다.
* **환경 및 헬퍼 자격 증명**: Claude Code는 관리형 설정이 제공하는 경우에도 `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN` 또는 `apiKeyHelper`로 인증하는 세션을 거부합니다. 해당 자격 증명을 제거한 다음 개발자가 `/login`을 실행하여 저장된 API 키를 생성하도록 하세요.
* **claude.ai 로그인**: Claude Code는 머신에서 이미 사용 중인 조직을 포함하여 나열하지 않은 조직에 대한 [로그인을 거부](#restrict-login-to-your-organization)합니다. 해당 조직을 유지하려면 `forceLoginOrgUUID` 배열에 추가하세요.

### 클라우드 공급자 인증

Amazon Bedrock, Google Cloud's Agent Platform 또는 Microsoft Foundry를 사용하는 팀의 경우:

**1. 공급자 설정 따르기**

[Amazon Bedrock 문서](https://code.claude.com/docs/ko/amazon-bedrock.md), [Google Cloud's Agent Platform 문서](https://code.claude.com/docs/ko/google-vertex-ai.md) 또는 [Microsoft Foundry 문서](https://code.claude.com/docs/ko/microsoft-foundry.md)를 따르세요.

**2. 구성 배포**

환경 변수 및 클라우드 자격 증명 생성 지침을 사용자에게 배포하세요. [여기서 구성을 관리하는 방법](https://code.claude.com/docs/ko/settings.md)에 대해 자세히 알아보세요.

**3. Claude Code 설치**

사용자는 [Claude Code를 설치](https://code.claude.com/docs/ko/setup.md#install-claude-code)할 수 있습니다.

### 조직에 대한 로그인 제한

개발자의 claude.ai 로그인이 특정 Anthropic 조직에 속하도록 요구하려면 [관리형 설정](https://code.claude.com/docs/ko/managed-settings.md)에서 [`forceLoginMethod`](https://code.claude.com/docs/ko/settings-reference#forceloginmethod) 및 [`forceLoginOrgUUID`](https://code.claude.com/docs/ko/settings-reference#forceloginorguuid)를 설정하세요. `forceLoginOrgUUID`를 조직 ID로 설정하세요. 조직 ID는 Claude for Teams 또는 Enterprise 조직의 [claude.ai 관리자 설정](https://claude.ai/admin-settings/organization)에 표시됩니다. Claude Code는 다른 조직에 대한 claude.ai 로그인에 대해 오류를 보고하고 사용 중인 claude.ai 자격 증명이 나열되지 않은 조직에 속하는 경우 시작 시 종료됩니다.

`forceLoginOrgUUID`를 단일 Console 조직 ID로 설정하면 Claude Code는 Claude Console 로그인 페이지에서 해당 조직을 미리 선택합니다. 조직 ID는 [platform.claude.com/settings/organization](https://platform.claude.com/settings/organization)에서 확인할 수 있습니다.

> [!NOTE]
>
> 시작 시 Claude Code는 저장된 Console 자격 증명이 어느 조직에 속하는지 확인하지 않습니다. Console 로그인의 조직을 제한하는 데 `forceLoginOrgUUID`에 의존하지 마세요. 이미 Console에 로그인한 개발자는 `forceLoginMethod` 또는 `forceLoginOrgUUID`를 배포한 후에도 로그인 상태를 유지합니다. 단, 저장된 Console API 키는 [게이트웨이](https://code.claude.com/docs/ko/claude-apps-gateway) 로그인도 요구하는 머신이나 클라우드 공급자를 선택하는 세션에서는 차단됩니다.

어떤 설정 파일에서든 `forceLoginOrgUUID`를 설정하면 Claude Code는 해당 파일이 적용되는 세션에서 [키 없는 Console 로그인](#sign-in-without-an-api-key)을 더 이상 제공하지 않습니다. 대신 개발자를 claude.ai 로그인으로 유도하려면 `forceLoginMethod`를 `"claudeai"`로 설정하세요.

Claude Code v2.1.212 이상에서는 여기에 나열된 모든 로그인 경로가 `forceLoginMethod`를 적용합니다. `/login` 또는 처음 실행 온보딩으로 도달하는 터미널의 대화형 로그인 화면에서 Claude Code는 `claudeai` 또는 `console` 방법을 미리 선택합니다. 그곳에서 다른 로그인을 차단하는 데 두 값 중 어느 것에도 의존하지 마세요.

경로는 `forceLoginOrgUUID`에서 다릅니다.

* **터미널, [VS Code 확장](https://code.claude.com/docs/ko/vs-code.md) 및 Agent SDK 로그인**: claude.ai 계정 로그인에 대해 `forceLoginOrgUUID` 확인
* **`claude setup-token` 및 `/install-github-app`**: `forceLoginMethod`만 강제하므로 다른 조직에서 토큰을 발급할 수 있습니다.
* **[게이트웨이](https://code.claude.com/docs/ko/claude-apps-gateway) 로그인**: `forceLoginMethod: "gateway"`로 선택되며 제한되지 않으며 Anthropic 조직에 대해 인증하지 않으므로 `forceLoginOrgUUID`가 적용되지 않습니다. 게이트웨이 ID 공급자를 사용하여 액세스를 제한하세요.

장치 관리 도구를 통해 `forceLoginMethod` 및 `forceLoginOrgUUID`를 배포하세요. 개발자는 조직에 인증한 후에만 [서버 관리 설정](https://code.claude.com/docs/ko/server-managed-settings.md)을 받으므로 해당 설정으로는 첫 로그인을 리디렉션할 수 없습니다. claude.ai에서 서버 관리 설정도 배포하는 경우 모든 클라이언트가 v2.1.299 이상을 실행할 때까지 그곳에도 두 키를 모두 설정하세요. 이후 키를 설정할 위치와 어느 소스의 값이 적용되는지는 [로그인 키를 제공하는 관리형 소스](https://code.claude.com/docs/ko/managed-settings.md#which-managed-source-supplies-login-keys)를 참조하세요.

[게이트웨이](https://code.claude.com/docs/ko/claude-apps-gateway) 배포에서는 [게이트웨이가 제공하는 설정](https://code.claude.com/docs/ko/claude-apps-gateway-config.md#managed)에서 `forceLoginMethod` 및 `forceLoginOrgUUID`를 제외하세요.

키는 또한 로그인 자격 증명을 사용하지 않는 세션이 시작될 수 있는지 여부를 결정합니다. 설정 참조에서 [`forceLoginOrgUUID`](https://code.claude.com/docs/ko/settings-reference#forceloginorguuid)를 참조하여 전체 동작을 확인하세요.

* **`ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN` 또는 `apiKeyHelper`**: 시작 시 차단됩니다. `forceLoginOrgUUID` 아래에서 환경 자격 증명에 대해 조직 멤버십을 확인할 수 없으며 `forceLoginMethod` 아래에서 자격 증명이 필요한 로그인을 대신할 것입니다. 관리형 설정이 [게이트웨이](https://code.claude.com/docs/ko/claude-apps-gateway) 로그인도 요구하는 경우 Claude Code는 이전 Claude Console 로그인으로 저장된 API 키를 동일한 방식으로 차단합니다. [관리자 정책에 클라우드 게이트웨이 로그인 필요](https://code.claude.com/docs/ko/errors.md#administrator-policy-requires-a-cloud-gateway-sign-in)를 참조하세요.
* **Amazon Bedrock과 같은 클라우드 공급자 세션**: `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN` 또는 `apiKeyHelper` 자격 증명, 또는 이전 Claude Console 로그인으로 저장된 API 키가 여전히 머신에 있는 동안에만 차단됩니다. 제거하면 세션이 시작됩니다. 이러한 세션은 클라우드 공급자에 대해 인증하며, 클라우드 공급자의 액세스 정책이 이를 제어합니다.
* **[Anthropic 프로필 또는 페더레이션 자격 증명](#anthropic-profiles-and-federation-credentials)**: `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN` 또는 `apiKeyHelper` 자격 증명, 또는 이전 Claude Console 로그인으로 저장된 API 키가 머신에도 있지 않는 한 차단되지 않습니다. 키는 프로필이 속한 조직을 확인하지 않습니다.

### 머신이 사용할 수 있는 API 공급자 제한

[관리형 설정](https://code.claude.com/docs/ko/managed-settings.md)의 [`allowedProviders`](https://code.claude.com/docs/ko/settings-reference#allowedproviders)는 관리형 머신이 Anthropic API, Amazon Bedrock 또는 LLM 게이트웨이와 같은 Claude에 도달할 수 있는 서비스를 나열합니다. 이는 세션이 Anthropic과 통신할 때 사용하는 계정을 제어하는 `forceLoginMethod` 및 `forceLoginOrgUUID`를 보완합니다. Claude Code v2.1.285 이상이 필요합니다.

```json managed-settings.json theme={null}
{
  "forceLoginMethod": "claudeai",
  "forceLoginOrgUUID": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"],
  "allowedProviders": ["anthropic", "bedrock"]
}
```

이 파일을 사용하면 claude.ai 조직에 로그인하거나 Amazon Bedrock으로 구성된 개발자가 정상적으로 시작됩니다. 다른 공급자로 설정된 세션은 시작 시 거부되며, 실행 중인 세션이 다른 공급자로 전환되면 다음 요청에서 거부됩니다. [관리형 설정이 이 API 공급자를 허용하지 않음](https://code.claude.com/docs/ko/errors.md#managed-settings-dont-allow-this-api-provider)은 각 메시지를 표시합니다.

* **LLM 게이트웨이 또는 프록시 허용**: `"customEndpoint"`를 나열하고 동일한 소스의 관리형 `env` 블록에서 게이트웨이의 URL을 설정하세요. [설정 참조](https://code.claude.com/docs/ko/settings-reference.md#allowedproviders)는 모든 값을 나열하고 어떤 엔드포인트 변수에 관리형 `env` 핀이 필요한지 설명합니다.
* **관리형 머신에 배포**: 정책의 나머지를 전달하는 관리형 소스에 목록을 넣으세요. 항목의 [범위 참고](https://code.claude.com/docs/ko/settings-reference.md#allowedproviders)는 서버 관리 목록이 이와 어떻게 결합되는지 설명합니다.
* **서버 관리 설정만**: [서버 관리 설정](https://code.claude.com/docs/ko/server-managed-settings.md)에만 설정하는 목록은 조직의 설정을 가져오는 세션에만 도달하므로 장치 관리로 도달할 수 없는 머신의 편의로 취급하세요. 강제 사항이 아닙니다. [플랫폼 가용성](https://code.claude.com/docs/ko/server-managed-settings.md#platform-availability)은 어떤 세션이 이를 가져오는지 나열합니다.

## 자격증명 관리

Claude Code는 인증 자격증명을 안전하게 관리합니다:

* **저장 위치**:
  * macOS에서는 자격증명이 암호화된 macOS Keychain에 저장됩니다. Keychain이 SSH 세션에서 잠긴 경우처럼 쓰기를 거부할 때, Claude Code는 대신 로그인을 `~/.claude/.credentials.json`에 파일 모드 `0600`으로 저장합니다. 이는 Linux에서 사용하는 것과 동일한 저장소입니다. Console 로그인이 API 키를 생성하는 경우 Keychain이 쓰기 가능할 때까지 실패합니다. 로그인을 Keychain으로 다시 이동하려면 [복구 단계](https://code.claude.com/docs/ko/troubleshoot-install.md#not-logged-in-or-token-expired)를 따르세요.
  * Linux에서는 자격증명이 `~/.claude/.credentials.json`에 파일 모드 `0600`으로 저장됩니다.
  * Windows에서는 자격증명이 `%USERPROFILE%\.claude\.credentials.json`에 저장되며 사용자 프로필 디렉터리의 액세스 제어를 상속받습니다. 이는 기본적으로 파일을 사용자 계정으로 제한합니다.
  * `CLAUDE_CONFIG_DIR` 환경 변수를 설정한 경우, Claude Code는 macOS 폴백이 쓰는 파일을 포함하여 `.credentials.json` 파일을 해당 디렉터리 아래에 유지하고, macOS Keychain 항목도 해당 디렉터리로 키를 지정하므로 다른 `CLAUDE_CONFIG_DIR`을 가진 세션은 다른 항목을 읽습니다.
  * Claude Code는 `/login` 및 `/logout`을 통해 `.credentials.json`을 관리합니다. 요청을 사용자 정의 API 엔드포인트를 통해 라우팅하려면 대신 [`ANTHROPIC_BASE_URL`](https://code.claude.com/docs/ko/env-vars) 환경 변수를 설정하세요.
* **지원되는 인증 유형**: claude.ai 자격증명, Claude API 자격증명, Microsoft Foundry Auth, Bedrock Auth, Vertex Auth, Anthropic 프로필 및 [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation) 자격증명, 그리고 [Claude apps gateway](https://code.claude.com/docs/ko/claude-apps-gateway) 세션 토큰.
* **사용자 정의 자격증명 스크립트**: [`apiKeyHelper`](https://code.claude.com/docs/ko/settings-reference#apikeyhelper) 설정을 구성하여 API 키를 반환하는 셸 스크립트를 실행합니다.
* **새로고침 간격**: Claude Code가 도우미를 다시 실행하는 경우에 대해 [`apiKeyHelper`](https://code.claude.com/docs/ko/settings-reference#apikeyhelper)를 참조하세요.
* **느린 도우미 알림**: `apiKeyHelper`가 키를 반환하는 데 10초 이상 걸리면, Claude Code는 프롬프트 표시줄에 경과 시간을 표시하는 경고 알림을 표시합니다. 이 알림을 정기적으로 보면 자격증명 스크립트를 최적화할 수 있는지 확인하세요.
* **도우미 실패**: 스크립트가 오류로 종료되거나, 시간 초과되거나, 아무것도 출력하지 않으면 요청은 3회 시도 내에 [`Your apiKeyHelper script is failing`](https://code.claude.com/docs/ko/errors#your-apikeyhelper-script-is-failing)으로 실패합니다.

`apiKeyHelper`, `ANTHROPIC_API_KEY`, 및 `ANTHROPIC_AUTH_TOKEN`은 CLI 및 VS Code 확장, Agent SDK, GitHub Actions를 포함하여 이를 래핑하는 표면에 적용됩니다. Claude Desktop 및 클라우드 세션은 `apiKeyHelper`를 호출하거나 이러한 환경 변수를 읽지 않습니다. 대신 OAuth를 사용하며, [타사 추론 구성](https://code.claude.com/docs/ko/llm-gateway-connect.md#desktop-app)을 실행하는 데스크톱 세션은 해당 구성의 자격증명으로 인증합니다.

### 저장된 로그인이 종료되는 시점 확인

사용 중인 claude.ai 로그인이 종료되는 시점을 확인하려면 셸에서 `claude auth status --text`를 실행하세요. Claude Code v2.1.318 이상에서는 `Sign-in`으로 시작하는 줄을 찾으세요:

```text theme={null}
Sign-in ends: between 2026-11-20 and 2026-11-23 (2026-11-23T17:04:11.000Z)
```

이른 날짜 전에 `/login` 또는 `claude auth login`으로 브라우저에서 다시 로그인하세요. Claude Code를 사용해도 로그인이 연장되지 않습니다. 해당 줄에 `any day now` 또는 `may have ended`가 표시되면 지금 로그인하세요. 다른 자격 증명을 사용하거나 알려진 날짜가 없으면 이 줄은 표시되지 않습니다.

늦은 날짜까지 10일 미만이 남으면 텍스트 출력을 사용하는 `claude -p` 실행이 stderr에 `Warning: this sign-in`을 출력하므로, 이른 날짜 전에 다시 로그인하세요.

### 만료되는 로그인 갱신

로그인의 [두 종료 날짜](#check-when-a-stored-login-ends) 중 이른 날짜부터 Claude Code는 시작 시 경고를 표시합니다: `Your login expires in 3 days · run /login to renew`.

갱신하려면 `/login`을 실행하세요. 경고는 claude.ai 로그인이 활성 자격 증명일 때만 나타납니다.

#### 로그인 만료 후

저장된 로그인이 만료되어 새로 고칠 수 없게 되면 `/login`을 실행하여 다시 로그인하세요. 다시 로그인할 때까지 요청은 실패하거나 저장해 둔 다른 자격 증명을 사용합니다:

* **다른 자격 증명이 없는 경우**: 모델 요청이 [`Login reached its time limit` 또는 `Login expired`](https://code.claude.com/docs/ko/errors#login-expired)로 실패합니다.
* **다른 자격 증명이 있는 경우**(예: [`ant auth login` 프로필](#anthropic-profiles-and-federation-credentials)): 요청이 대신 해당 자격 증명을 사용할 수 있으며, 비용은 해당 자격 증명의 조직에 청구됩니다.

요청이 실패하기 전에 만료된 로그인을 확인할 수 있습니다: [`/status`](https://code.claude.com/docs/ko/commands)는 `Expired — log in again`이라고 표시된 `Login` 행을 보여 줍니다.

무인으로 실행되는 세션의 경우 조기 갱신이 가장 중요합니다. 로그인보다 오래 지속되는 [Remote Control](https://code.claude.com/docs/ko/remote-control.md) 세션은 다시 로그인할 때까지 연결이 끊깁니다. [에이전트 보기의 백그라운드 세션](https://code.claude.com/docs/ko/agent-view.md)은 저장된 다른 자격 증명이 없으면 진행을 멈춥니다.

### 인증 우선순위

여러 자격증명이 있을 때, Claude Code는 다음 순서로 하나를 선택합니다:

1. `CLAUDE_CODE_USE_BEDROCK`, `CLAUDE_CODE_USE_VERTEX`, 또는 `CLAUDE_CODE_USE_FOUNDRY`가 설정된 경우 클라우드 공급자 자격증명. 설정에 대해 [타사 통합](https://code.claude.com/docs/ko/third-party-integrations.md)을 참조하세요.
2. `ANTHROPIC_AUTH_TOKEN` 환경 변수. `Authorization: Bearer` 헤더로 전송됩니다. Anthropic API 키가 아닌 베어러 토큰으로 인증하는 [LLM 게이트웨이 또는 프록시](https://code.claude.com/docs/ko/llm-gateway)를 통해 라우팅할 때 사용하세요.
3. `ANTHROPIC_API_KEY` 환경 변수. `X-Api-Key` 헤더로 전송됩니다. [Claude Console](https://platform.claude.com)의 키를 사용하여 Anthropic API에 직접 액세스할 때 사용하세요. 대화형 모드에서는 키를 승인하거나 거부하도록 한 번 요청받으며, 선택이 기억됩니다. 나중에 변경하려면 `/config`에서 "Use custom API key" 토글을 사용하세요. 토글은 `ANTHROPIC_API_KEY`가 환경에 설정되어 있는 동안에만 나타납니다. 비대화형 모드(`-p`)에서는 키가 있을 때 항상 사용됩니다.
4. [`apiKeyHelper`](https://code.claude.com/docs/ko/settings-reference#apikeyhelper) 스크립트 출력. 자격증명 모음에서 가져온 단기 토큰과 같은 동적 또는 회전 자격증명에 사용하세요.
5. `CLAUDE_CODE_OAUTH_TOKEN` 환경 변수. [`claude setup-token`](#generate-a-long-lived-token)으로 생성된 장기 OAuth 토큰. 브라우저 로그인을 사용할 수 없는 CI 파이프라인 및 스크립트에 사용하세요. 변수가 설정된 동안 `/login`을 실행하면, Claude Code는 현재 세션을 새 로그인으로 전환합니다. 새 세션에서도 해당 로그인을 유지하려면 셸 프로필과 사용자 설정과 같은 [변수를 설정할 수 있는 설정 파일](https://code.claude.com/docs/ko/settings-reference.md#variables-claude-code-ignores-in-env)에서 변수를 제거하세요.
6. Anthropic 프로필 및 페더레이션 자격증명. `ant` CLI 및 Workload Identity Federation이 사용하는 자격증명입니다. `ant auth login`이 작성한 프로필은 `ANTHROPIC_PROFILE`에서 이름을 지정할 때만 여기에 순위가 매겨집니다. 그렇지 않으면 `/login` 아래에 순위가 매겨집니다. [Anthropic 프로필 및 페더레이션 자격증명](#anthropic-profiles-and-federation-credentials)을 참조하세요.
7. `/login`의 구독 OAuth 자격 증명. 이는 Claude Pro, Max, Ultra, Team, Enterprise 사용자의 기본값입니다.

로그인한 [Claude apps gateway](https://code.claude.com/docs/ko/claude-apps-gateway) 세션은 이 목록 외에 있습니다. Amazon Bedrock 또는 Google Cloud의 Agent Platform과 같은 공급자 선택이며, 이들을 능가합니다. 게이트웨이 세션이 있으면, `CLAUDE_CODE_USE_BEDROCK`, `CLAUDE_CODE_USE_VERTEX`, 또는 `CLAUDE_CODE_USE_FOUNDRY`가 설정되어 있어도 CLI는 게이트웨이 토큰으로 인증하며, 베어러 토큰, API 키, `apiKeyHelper`, 프로필과 같은 위의 자격증명 소스는 사용되지 않습니다.

조직이 Enterprise Admin Console에서 공급자나 게이트웨이를 설정하고 [해당 조직에 로그인](#log-in-to-claude-code)한 경우에는 대신 [요청이 전달되는 위치](https://claude.com/docs/third-party/claude-desktop/admin-console-claude-code#how-console-settings-reach-claude-code)를 참조하세요.

머신의 [관리 설정](https://code.claude.com/docs/ko/managed-settings.md)이 [`forceLoginMethod`](https://code.claude.com/docs/ko/settings-reference#forceloginmethod)를 `"gateway"`로 설정하거나 [`forceLoginGatewayUrl`](https://code.claude.com/docs/ko/settings-reference#forcelogingatewayurl)을 설정하고, `CLAUDE_CODE_USE_BEDROCK` 또는 `CLAUDE_CODE_USE_VERTEX`와 같은 변수를 통해 클라우드 공급자를 선택하지 않으면, 세션은 게이트웨이 로그인만 사용합니다. Claude Code는 다른 자격증명 소스를 건너뛰고 `/login`으로 로그인하도록 요청합니다. 각 남은 자격증명으로 표시되는 내용에 대해 [Administrator policy requires a Cloud gateway sign-in](https://code.claude.com/docs/ko/errors.md#administrator-policy-requires-a-cloud-gateway-sign-in)을 참조하세요. Claude Code v2.1.261 이상 또는 `forceLoginGatewayUrl`만 설정하는 머신에서 v2.1.265 이상이 필요합니다.

활성 Claude 구독이 있지만 환경에 `ANTHROPIC_API_KEY`도 설정되어 있으면, Claude Code는 승인 후 API 키를 사용합니다. 키가 비활성화되거나 만료된 조직에 속하면 인증 실패를 유발할 수 있습니다.

`unset ANTHROPIC_API_KEY`를 실행하여 구독으로 폴백하고, `/status`를 확인하여 어느 방법이 활성인지 확인하세요. 로그인과 API 키가 모두 구성되면, `/status`는 사용 중이 아닌 자격증명을 표시합니다.

[클라우드 세션](https://code.claude.com/docs/ko/claude-code-on-the-web.md)은 항상 구독 자격증명을 사용합니다. 클라우드 환경에서 `ANTHROPIC_API_KEY` 또는 `ANTHROPIC_AUTH_TOKEN`을 설정하면, 구독 자격증명을 재정의하지 않습니다.

#### Anthropic 프로필 및 페더레이션 자격증명

프로필은 [Anthropic 구성 디렉터리](https://platform.claude.com/docs/en/manage-claude/wif-reference#configuration-directory)의 명명된 자격증명 구성 파일입니다. 기본값은 macOS 및 Linux에서 `~/.config/anthropic` 또는 Windows에서 `%APPDATA%\Anthropic`입니다. 프로필의 인증 모드는 [Workload Identity Federation (WIF)](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation)에 대해 설정할 때 `oidc_federation`이거나 [`ant auth login`](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/authentication)이 작성했을 때 또는 [API 키 없이 Console 계정에 로그인](#sign-in-without-an-api-key)할 때 `user_oauth`입니다.

Claude Code는 [bare 모드](https://code.claude.com/docs/ko/headless.md#start-faster-with-bare-mode), Claude Desktop, 또는 클라우드 세션에서 프로필이나 페더레이션 변수를 읽지 않습니다. 이러한 세션에서 `/status`는 `Profile` 행을 표시하지 않습니다. 이를 읽는 경우, Claude Code는 다음 순서로 세 가지 소스를 확인하고 설정된 첫 번째 소스에서 중지합니다.

| 소스 | 설정 방법 | claude.ai 로그인 대비 순위 |
| :- | :- | :- |
| 명명된 프로필 | `ANTHROPIC_PROFILE` | 위, 프로필이 가진 인증 모드 상관없이 |
| 페더레이션 변수 | `ANTHROPIC_FEDERATION_RULE_ID` 및 `ANTHROPIC_ORGANIZATION_ID`, 둘 다 설정됨 | 위 |
| 활성 프로필 | 구성 디렉터리의 [`active_config` 파일](https://platform.claude.com/docs/en/manage-claude/wif-reference#active-profile) 또는 `default`라는 프로필 | 인증 모드가 `oidc_federation`일 때 위; 인증 모드가 `user_oauth`일 때 여전히 작동하는 claude.ai 로그인 아래 |

`/login`이 API 키를 저장했고 `CI`가 설정되지 않은 경우, Claude Code는 이러한 소스 대신 해당 키를 사용합니다. 이를 제거하려면 [`/logout`을 실행하세요](https://code.claude.com/docs/ko/troubleshoot-install#not-logged-in-or-token-expired).

페더레이션 변수의 경우, Claude Code는 ID 토큰을 교환할 때 [WIF 참조](https://platform.claude.com/docs/en/manage-claude/wif-reference#environment-variables)의 `ANTHROPIC_IDENTITY_TOKEN_FILE`과 같은 다른 변수도 읽습니다. 프로필 파일 형식에 대해서는 [WIF 참조](https://platform.claude.com/docs/en/manage-claude/wif-reference#profile-configuration-file)를 참조하세요.

Claude Code가 선택한 소스를 확인하려면 `/status`를 실행하세요. `Profile` 행은 `Login method` 행 대신 소스의 이름을 지정합니다. 프로필이 사용 중인 자격증명일 때, `Organization` 및 `Email` 행은 해당 계정을 표시합니다.

`user_oauth` 프로필의 로그인이 만료되고 Claude Code가 이를 갱신할 수 없으면, 요청은 [만료된 프로필 로그인 오류](https://code.claude.com/docs/ko/errors.md#anthropic-profile-login-expired)로 실패합니다.

[claude.ai 커넥터](https://code.claude.com/docs/ko/mcp.md#use-mcp-servers-from-claude-ai) 및 [`/schedule`](https://code.claude.com/docs/ko/routines)과 같이 claude.ai 로그인이 필요한 기능은 이러한 소스 중 하나가 선택되어 있는 동안 사용할 수 없습니다. Claude Code가 소스를 선택하지 않도록 하려면:

* **명명된 프로필 또는 페더레이션 변수**: `ANTHROPIC_PROFILE`을 설정 해제하거나 페더레이션 변수 중 하나를 설정 해제합니다.
* **활성 프로필**: [API 키 없이 Console 계정에 로그인](#sign-in-without-an-api-key)하여 작성한 현재 자격증명을 가진 `user_oauth` 프로필의 경우 `/logout`을 실행하고, `ant auth login`이 작성한 현재 자격증명을 가진 경우 `ant auth logout`을 실행하거나, 구성 디렉터리의 `configs/`에서 프로필의 파일을 삭제합니다. 두 인증 모드 모두에 대해.

### 장기 토큰 생성

대화형 브라우저 로그인을 사용할 수 없는 CI 파이프라인, 스크립트 또는 기타 환경의 경우, `claude setup-token`으로 1년 OAuth 토큰을 생성합니다:

```bash theme={null}
claude setup-token
```

명령은 `/login`과 동일한 브라우저 인증 흐름을 열고, 브라우저에서 액세스를 승인한 후 토큰이 터미널에 출력됩니다. 토큰을 어디에도 저장하지 않습니다. 복사하여 인증하려는 곳에 `CLAUDE_CODE_OAUTH_TOKEN` 환경 변수로 설정합니다:

> [tab] macOS, Linux, WSL
>
> ```bash theme={null}
> export CLAUDE_CODE_OAUTH_TOKEN=your-token
> ```

> [tab] Windows PowerShell
>
> ```powershell theme={null}
> $env:CLAUDE_CODE_OAUTH_TOKEN = "your-token"
> ```

> [tab] Windows CMD
>
> ```batch theme={null}
> set CLAUDE_CODE_OAUTH_TOKEN=your-token
> ```

이 토큰은 Claude 구독으로 인증하며 Pro, Max, Ultra, Team, 또는 Enterprise 플랜이 필요합니다. 모델 요청만 수행할 수 있으므로 [Remote Control](https://code.claude.com/docs/ko/remote-control.md) 세션을 설정하거나 [claude.ai 커넥터](https://code.claude.com/docs/ko/mcp.md#use-mcp-servers-from-claude-ai)를 가져올 수 없습니다. 로컬로 구성한 MCP 서버는 여전히 작동합니다.

[베어 모드](https://code.claude.com/docs/ko/headless.md#start-faster-with-bare-mode)는 `CLAUDE_CODE_OAUTH_TOKEN`을 읽지 않습니다. 스크립트가 `--bare`를 전달하면, 대신 `ANTHROPIC_API_KEY` 또는 `apiKeyHelper`로 인증하세요.
