> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/docs/docs-ja/penetorshontesuto/configure-a-pentest/setting-up-authenticated-testing/handling-email-verification-and-magic-links.md).

# メール認証とマジックリンクへの対応

Aikidoはホスト型のメール受信箱を提供し、AIペンテストエージェントがメール対応を必要とする認証フローを進められるようにします。

**アプリケーションが以下を必要とする場合は、この機能を使用してください：**

* **マジックリンク：** メールリンクによるパスワードレスログイン。
* **メールMFA：** コードが受信箱に送信される二要素認証。
* **アカウント確認：** 新規ユーザーは、ログイン前にメールアドレスを確認する必要があります。

{% hint style="info" %}
アプリが認証アプリを使用している場合は、 [TOTP セットアップ](/docs/docs-ja/penetorshontesuto/configure-a-pentest/setting-up-authenticated-testing/handling-two-factor-authentication-totp.md).

アプリがSMSコードを使用している場合は、 [SMS認証](/docs/docs-ja/penetorshontesuto/configure-a-pentest/setting-up-authenticated-testing/handling-sms-verification.md).
{% endhint %}

### 仕組み

あなたは一意の `@auto-pentest.com` メールアドレスをAikido内で生成します。このアドレスは橋渡し役として機能します：

1. **あなたには** これを使って、アプリケーション内で有効なユーザーアカウントを作成し、確認します。
2. **エージェントは** スキャン中にこの受信箱を監視し、ログインコードの取得やマジックリンクのリアルタイムクリックを行います。

### セットアップガイド

{% stepper %}
{% step %}
**Aikidoにメールアドレスを作成させる**

で **認証セット** モーダル：

1. 以下までスクロールして **メール受信箱** セクションで指定できます。
2. クリック `+ メールアドレスを生成`.
3. アドレスをコピー（例： `random-name@auto-pentest.com`).

<div data-with-frame="true"><figure><img src="/files/22c8a45b1c6bcf8fc22e315b142410565053383d" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**アプリケーションでテストユーザーを作成**

アプリケーションに移動し、先ほど作成したアドレスを使って新しいユーザーを登録します。
{% endstep %}

{% step %}
**アカウントを確認する（必要な場合）**

アプリがサインアップ時に「メールを確認してください」リンクを送信する場合：

1. Aikidoのモーダルに戻ります。
2. 次をクリックします： **受信箱を開く** アイコン（またはメールアドレス自体をクリック）。
3. アプリからの確認メールが表示されます。
4. それを開き、確認リンク／ボタンをクリックしてユーザーを有効化します。

<div data-with-frame="true"><figure><img src="/files/90609c0fd3a27e29a009335f30fccb8bd04092a8" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Aikidoでログインロジックを更新**

この受信箱を確認するよう、エージェントに明示的に指示する必要があります。 **ログインロジック** テキストエリアで。

**マジックリンクの指示例：**

```
1. https://app.example.com/login に移動する
2. メールを入力：[ここに作成したメールを挿入]
3. 「マジックリンクを送信」をクリック
4. 受信箱でログインメールを確認し、内部のリンクをクリックします。
```

**メールMFAの指示例：**

```
1. https://app.example.com/login に移動する
2. ユーザー名とパスワードを入力します。
3. コードを求められたら、受信箱を確認します。
4. 最新のメールから6桁のコードを抽出します。
5. コードを認証フィールドに入力して送信します。
```

<div data-with-frame="true"><figure><img src="/files/e1f6ddfac55bd47263528167fbc2253d8cfef587" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**設定をテスト**

最後に、エージェントがあなたの手順を解釈できることを確認してください：

1. クリック **保存してテスト**.
2. エージェントはブラウザーセッションを起動し、認証情報と受信箱の手順を使ってログインを試みます。
3. 成功すると、エージェントが認証され、ログイン後の状態に到達したことを示す確認が表示されます。

<div data-with-frame="true"><figure><img src="/files/d73445280a4a28187dc8ec723de0d78a1fd7a387" alt=""><figcaption></figcaption></figure></div>
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.aikido.dev/docs/docs-ja/penetorshontesuto/configure-a-pentest/setting-up-authenticated-testing/handling-email-verification-and-magic-links.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
