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

# Google

> Google OAuth 연동 방법을 안내합니다.

<Card>
  Google OAuth를 등록하면 Google 로그인 방식에 의해 `Porter AI`의 사용자로 등록하고 로그인할 수 있습니다.
</Card>

## Google Auth Platform 접속

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/03_01.png" />
</Frame>

> Google Cloud 콘솔의 Google Auth Platform 페이지에서 `GET STARTED`를 클릭하는 것으로 시작합니다.

## Overview

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/03_02.png" />
</Frame>

> Overview 페이지의 각 과정에서 아래의 값을 입력하고 `CREATE`를 클릭하세요.

* **App Information:** 앱 이름과 Google OAuth 동의 관련 문의 이메일

* **Audience:** External

* **Contact Information:** Google Cloud 프로젝트 내 변경 사항 수신 이메일

* **Finish:** 구글 정책 동의 체크

## Branding

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/03_03.png" />
</Frame>

> Branding 페이지에서 App domain에 관한 정보를 아래와 같이 입력하세요.

* **Application home page:** 배포한 `Porter AI`의 URL `https://app.[도메인]`

* **Application privacy policy link:** Google OAuth를 사용하는 서비스의 개인정보처리방침 URL

* **Application terms of service link:** Google OAuth를 사용하는 서비스의 서비스 약관 링크

* **Authorized domains:**
  * 애플리케이션 홈페이지, 개인정보처리방침 링크, 서비스 약관 링크에서 사용된 도메인 입력
  * 상이한 도메인 사용 시, `ADD DOMAIN`을 클릭해 사용된 모든 도메인 입력

<Tip>
  이 과정에서 로고를 등록하지 않아도 Google OAuth를 사용할 수 있으며, 로고를 등록할 경우 로고에 대한 인증 과정이 필요합니다.
</Tip>

## Audience

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/03_04.png" />
</Frame>

> Audience 페이지에서 `PUBLISH APP`을 클릭해서 앱을 사용할 수 있도록 설정하세요.

## Client

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/03_05.png" />
</Frame>

> Client 페이지에서 `CREATE CLIENT`를 클릭하고 아래와 같은 설정으로 OAuth Client ID를 생성하세요.

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/03_06.png" />
</Frame>

* **Application type:** Web application

* **Authorized redirect URIs:** `https://app.[도메인]/api/oauth/google/callback`

## Data Access

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/03_07.png" />
</Frame>

> Data Access 페이지에서 위의 스크린샷의 순서대로 scope를 추가하세요.

<Note>
  추가할 scope는 `.../auth/userinfo.profile`입니다.
</Note>

## Client ID, Client Secret 조회

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/03_08.png" />
</Frame>

> 좌측 사이드바의 Client 페이지에서, 생성된 Client 이름을 클릭하면 **Client ID**와 **Client Secret**을 조회할 수 있습니다.

***

## Porter AI 운영 시스템에 등록

<Frame>
  <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/02_09.png" />
</Frame>

> `운영 시스템 > 설정 > 인증 수단`의 Google 드롭다운을 클릭한 후, 앞 단계에서 조회한 값들을 각 필드에 입력하고 `적용하기`를 클릭하세요.

<Tip>
  **로그인 사용** 항목을 비활성화하면, Google login이 비활성화됩니다.
</Tip>

<Info>
  적용 완료 후 대시보드에 접속하면 다음과 같이 **Google 계정으로 로그인** 버튼이 표시됩니다.

  <Frame>
    <img className="block rounded-md" src="https://files.cloudtype.io/ale-docs/authentication/images/02_10.png" />
  </Frame>
</Info>
