> For the complete documentation index, see [llms.txt](https://gsdc-farm.gitbook.io/gsdc-otp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gsdc-farm.gitbook.io/gsdc-otp/generate-otp.md).

# Generate OTP

## 사전 준비 (Preparation)

&#x20;먼저 휴대폰의 앱스토어에서 Authenticator 앱을 다운 받아야 합니다. "Google Authenticator" 을 추천합니다.

First, you need to download the Authenticator app from your mobile's app store. We recommend "Google Authenticator."

(Google Store : [링크](https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2\&pcampaignid=web_share), Apple Store : [링크](< https://apps.apple.com/kr/app/google-authenticator/id388497605>) )

<figure><img src="/files/YyP4wF03MUyO7j22ZjWC" alt="" width="120"><figcaption></figcaption></figure>

## OTP 토큰 추가 (Adding OTP Token)

OTP 관련 설정을 하기 위해 GSDC UI 서버에 접속하여 다음의 명령어를 사용합니다. 이 명령은 사용자에게 OTP 토큰을 할당하고, 알고리즘으로 SHA-512를 사용합니다.

To configure OTP settings, connect to the GSDC UI server and use the following command. This command assigns an OTP token to the user and utilizes the SHA-512 algorithm.

```
 ipa otptoken-add --owner=[계정명]
```

<예>

```sh
$> ipa otptoken-add --owner=test_ipa 
------------------
Added OTP token ""
------------------
  Unique ID: [Unique ID 생성]
  Type: TOTP
  Owner: test_ipa
  Key: [키 정보]
  Algorithm: sha512
  Digits: 6
  Clock offset: 0
  Clock interval: 30
  URI: [URI 정보]
```

<figure><img src="/files/JyZwSZzouME4P0oX809g" alt="" width="375"><figcaption></figcaption></figure>

만들어진 QR 코드를 다운받은 Authenticator 앱에 추가합니다.&#x20;

Scan the generated QR code using the downloaded Authenticator app.

Authenticator 앱 실행 (Open the Authenticator app)  -> 오른쪽 하단 "+" 클릭 (Click the "+" at the bottom right) -> "QR 코드 스캔" 실행 (Select "Scan QR Code")-> 생성된 QR코드 스캔 (Scan the generated QR code)

<figure><img src="/files/Q4fdYNoa9ZIOuiRZAqWH" alt=""><figcaption></figcaption></figure>

## OTP 토큰 조회

만들어진 사용자의 OTP 토큰 정보를 확인하기 위해서는 다음의 명령어를 사용합니다.  명령을 실행하면, 사용자에게 할당된 OTP 토큰의 정보가 출력됩니다.

To check the generated OTP token information for a user, use the following command. Once the command is executed, the OTP token information assigned to the user will be displayed.

<pre><code><strong>ipa otptoken-find --owner=[계정명]
</strong></code></pre>

<예>

```sh
$> ipa otptoken-find --owner=test_ipa
-------------------
1 OTP token matched
-------------------
  Unique ID: [토큰의 Unique ID]
  Type: TOTP
  Owner: test_ipa
----------------------------
Number of entries returned 1
----------------------------
```

##
