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

> テナントとアプリケーションのデフォルトのログインルートの設定方法について説明します。

# デフォルトのログインルートを設定する

export const AuthCodeGroup = ({children, dropdown}) => {
  const [processedChildren, setProcessedChildren] = useState(children);
  useEffect(() => {
    let unsubscribe = null;
    function init() {
      unsubscribe = window.autorun(() => {
        const processChildren = node => {
          if (typeof node === "string") {
            let processedNode = node;
            for (const [key, value] of window.rootStore.variableStore.values.entries()) {
              const escapedKey = key.replaceAll(/[.*+?^${}()|[\]\\]/g, (String.raw)`\$&`);
              processedNode = processedNode.replaceAll(new RegExp(escapedKey, "g"), value);
            }
            return processedNode;
          } else if (Array.isArray(node)) {
            return node.map(processChildren);
          } else if (node && node.props && node.props.children) {
            return {
              ...node,
              props: {
                ...node.props,
                children: processChildren(node.props.children)
              }
            };
          }
          return node;
        };
        setProcessedChildren(processChildren(children));
      });
    }
    if (window.rootStore) {
      init();
    } else {
      window.addEventListener("adu:storeReady", init);
    }
    return () => {
      window.removeEventListener("adu:storeReady", init);
      unsubscribe?.();
    };
  }, [children]);
  return <CodeGroup dropdown={dropdown}>{processedChildren}</CodeGroup>;
};

export const AuthCodeBlock = ({filename, icon, language, highlight, children}) => {
  const [displayText, setDisplayText] = useState(children);
  const [copyText, setCopyText] = useState(children);
  const wrapperRef = React.useRef(null);
  useEffect(() => {
    let unsubscribe = null;
    function init() {
      if (!window.autorun || !window.rootStore) {
        return;
      }
      unsubscribe = window.autorun(() => {
        let processedChildrenForDisplay = children;
        let processedChildrenForCopy = children;
        for (const [key, value] of window.rootStore.variableStore.values.entries()) {
          const escapedKey = key.replaceAll(/[.*+?^${}()|[\]\\]/g, (String.raw)`\$&`);
          let displayValue = value;
          if (key === "{yourClientSecret}" && value !== "{yourClientSecret}") {
            displayValue = value.substring(0, 3) + "*****MASKED*****";
          }
          processedChildrenForDisplay = processedChildrenForDisplay.replaceAll(new RegExp(escapedKey, "g"), displayValue);
          processedChildrenForCopy = processedChildrenForCopy.replaceAll(new RegExp(escapedKey, "g"), value);
        }
        setDisplayText(processedChildrenForDisplay);
        setCopyText(processedChildrenForCopy);
      });
    }
    if (window.rootStore) {
      init();
    } else {
      window.addEventListener("adu:storeReady", init);
    }
    return () => {
      window.removeEventListener("adu:storeReady", init);
      unsubscribe?.();
    };
  }, [children]);
  useEffect(() => {
    if (!wrapperRef.current) return;
    const originalWriteText = navigator.clipboard.writeText.bind(navigator.clipboard);
    let isOverriding = false;
    const handleClick = e => {
      const button = e.target.closest('[data-testid="copy-code-button"]');
      if (!button || !wrapperRef.current.contains(button)) return;
      isOverriding = true;
      navigator.clipboard.writeText = text => {
        if (isOverriding) {
          isOverriding = false;
          navigator.clipboard.writeText = originalWriteText;
          return originalWriteText(copyText);
        }
        return originalWriteText(text);
      };
      setTimeout(() => {
        if (isOverriding) {
          isOverriding = false;
          navigator.clipboard.writeText = originalWriteText;
        }
      }, 100);
    };
    const wrapper = wrapperRef.current;
    wrapper.addEventListener('click', handleClick, true);
    return () => {
      wrapper.removeEventListener('click', handleClick, true);
      if (navigator.clipboard.writeText !== originalWriteText) {
        navigator.clipboard.writeText = originalWriteText;
      }
    };
  }, [copyText]);
  return <div ref={wrapperRef}>
      <CodeBlock filename={filename} icon={icon} language={language} lines highlight={highlight}>
        {displayText}
      </CodeBlock>
    </div>;
};

特定のケース (以下で説明) では、Auth0 が OIDC のサードパーティ開始ログインを使用して、アプリケーションの Login Initiation エンドポイントにリダイレクトし直す必要が生じる場合があります。詳しくは、[OpenID Foundation](https://openid.net) の [Initiating Login from a Third Party](https://openid.net/specs/openid-connect-core-1_0.html#ThirdPartyInitiatedLogin) をご覧ください。

これらの URI は、Auth0 Dashboard の [Application Settings](https://manage.auth0.com/#/applications/settings) または [Tenant Advanced Settings](https://manage.auth0.com/#/tenant/advanced)、あるいは <Tooltip tip="Management API: お客様が管理タスクを実行できるようにする製品です。" cta="用語集を見る" href="/docs/ja-jp/glossary?term=Management+API">Management API</Tooltip> を使用して設定できます。

<Tabs>
  <Tab title="アプリケーションレベル">
    <AuthCodeGroup>
      ```bash cURL theme={null}
      curl --request PATCH \
        --url 'https://{yourDomain}/api/v2/clients/{yourClientId}' \
        --header 'authorization: Bearer API2_ACCESS_TOKEN' \
        --header 'cache-control: no-cache' \
        --header 'content-type: application/json' \
        --data '{"initiate_login_uri": "<login_url>"}'
      ```

      ```csharp C# theme={null}
      var client = new RestClient("https://{yourDomain}/api/v2/clients/{yourClientId}");
      var request = new RestRequest(Method.PATCH);
      request.AddHeader("content-type", "application/json");
      request.AddHeader("authorization", "Bearer API2_ACCESS_TOKEN");
      request.AddHeader("cache-control", "no-cache");
      request.AddParameter("application/json", "{"initiate_login_uri": "<login_url>"}", ParameterType.RequestBody);
      IRestResponse response = client.Execute(request);
      ```

      ```go Go theme={null}
      package main

      import (
      	"fmt"
      	"strings"
      	"net/http"
      	"io/ioutil"
      )

      func main() {

      	url := "https://{yourDomain}/api/v2/clients/{yourClientId}"

      	payload := strings.NewReader("{"initiate_login_uri": "<login_url>"}")

      	req, _ := http.NewRequest("PATCH", url, payload)

      	req.Header.Add("content-type", "application/json")
      	req.Header.Add("authorization", "Bearer API2_ACCESS_TOKEN")
      	req.Header.Add("cache-control", "no-cache")

      	res, _ := http.DefaultClient.Do(req)

      	defer res.Body.Close()
      	body, _ := ioutil.ReadAll(res.Body)

      	fmt.Println(res)
      	fmt.Println(string(body))

      }
      ```

      ```java Java theme={null}
      HttpResponse<String> response = Unirest.patch("https://{yourDomain}/api/v2/clients/{yourClientId}")
        .header("content-type", "application/json")
        .header("authorization", "Bearer API2_ACCESS_TOKEN")
        .header("cache-control", "no-cache")
        .body("{"initiate_login_uri": "<login_url>"}")
        .asString();
      ```

      ```javascript Node.JS theme={null}
      var axios = require("axios").default;

      var options = {
        method: 'PATCH',
        url: 'https://{yourDomain}/api/v2/clients/{yourClientId}',
        headers: {
          'content-type': 'application/json',
          authorization: 'Bearer API2_ACCESS_TOKEN',
          'cache-control': 'no-cache'
        },
        data: {initiate_login_uri: '<login_url>'}
      };

      axios.request(options).then(function (response) {
        console.log(response.data);
      }).catch(function (error) {
        console.error(error);
      });
      ```

      ```php PHP theme={null}
      $curl = curl_init();

      curl_setopt_array($curl, [
        CURLOPT_URL => "https://{yourDomain}/api/v2/clients/{yourClientId}",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => "",
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 30,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => "PATCH",
        CURLOPT_POSTFIELDS => "{"initiate_login_uri": "<login_url>"}",
        CURLOPT_HTTPHEADER => [
          "authorization: Bearer API2_ACCESS_TOKEN",
          "cache-control: no-cache",
          "content-type: application/json"
        ],
      ]);

      $response = curl_exec($curl);
      $err = curl_error($curl);

      curl_close($curl);

      if ($err) {
        echo "cURL Error #:" . $err;
      } else {
        echo $response;
      }
      ```

      ```python Python theme={null}
      import http.client

      conn = http.client.HTTPSConnection("")

      payload = "{"initiate_login_uri": "<login_url>"}"

      headers = {
          'content-type': "application/json",
          'authorization': "Bearer API2_ACCESS_TOKEN",
          'cache-control': "no-cache"
          }

      conn.request("PATCH", "/{yourDomain}/api/v2/clients/{yourClientId}", payload, headers)

      res = conn.getresponse()
      data = res.read()

      print(data.decode("utf-8"))
      ```

      ```ruby Ruby theme={null}
      require 'uri'
      require 'net/http'
      require 'openssl'

      url = URI("https://{yourDomain}/api/v2/clients/{yourClientId}")

      http = Net::HTTP.new(url.host, url.port)
      http.use_ssl = true
      http.verify_mode = OpenSSL::SSL::VERIFY_PEER

      request = Net::HTTP::Patch.new(url)
      request["content-type"] = 'application/json'
      request["authorization"] = 'Bearer API2_ACCESS_TOKEN'
      request["cache-control"] = 'no-cache'
      request.body = "{"initiate_login_uri": "<login_url>"}"

      response = http.request(request)
      puts response.read_body
      ```
    </AuthCodeGroup>
  </Tab>

  <Tab title="テナントレベル">
    <AuthCodeGroup>
      ```bash cURL theme={null}
      curl --request PATCH \
        --url 'https://{yourDomain}/api/v2/tenants/settings' \
        --header 'authorization: Bearer API2_ACCESS_TOKEN' \
        --header 'cache-control: no-cache' \
        --header 'content-type: application/json' \
        --data '{"default_redirection_uri": "<login_url>"}'
      ```

      ```csharp C# theme={null}
      var client = new RestClient("https://{yourDomain}/api/v2/tenants/settings");
      var request = new RestRequest(Method.PATCH);
      request.AddHeader("content-type", "application/json");
      request.AddHeader("authorization", "Bearer API2_ACCESS_TOKEN");
      request.AddHeader("cache-control", "no-cache");
      request.AddParameter("application/json", "{"default_redirection_uri": "<login_url>"}", ParameterType.RequestBody);
      IRestResponse response = client.Execute(request);
      ```

      ```go Go theme={null}
      package main

      import (
      	"fmt"
      	"strings"
      	"net/http"
      	"io/ioutil"
      )

      func main() {

      	url := "https://{yourDomain}/api/v2/tenants/settings"

      	payload := strings.NewReader("{"default_redirection_uri": "<login_url>"}")

      	req, _ := http.NewRequest("PATCH", url, payload)

      	req.Header.Add("content-type", "application/json")
      	req.Header.Add("authorization", "Bearer API2_ACCESS_TOKEN")
      	req.Header.Add("cache-control", "no-cache")

      	res, _ := http.DefaultClient.Do(req)

      	defer res.Body.Close()
      	body, _ := ioutil.ReadAll(res.Body)

      	fmt.Println(res)
      	fmt.Println(string(body))

      }
      ```

      ```java Java theme={null}
      HttpResponse<String> response = Unirest.patch("https://{yourDomain}/api/v2/tenants/settings")
        .header("content-type", "application/json")
        .header("authorization", "Bearer API2_ACCESS_TOKEN")
        .header("cache-control", "no-cache")
        .body("{"default_redirection_uri": "<login_url>"}")
        .asString();
      ```

      ```javascript Node.JS theme={null}
      var axios = require("axios").default;

      var options = {
        method: 'PATCH',
        url: 'https://{yourDomain}/api/v2/tenants/settings',
        headers: {
          'content-type': 'application/json',
          authorization: 'Bearer API2_ACCESS_TOKEN',
          'cache-control': 'no-cache'
        },
        data: {default_redirection_uri: '<login_url>'}
      };

      axios.request(options).then(function (response) {
        console.log(response.data);
      }).catch(function (error) {
        console.error(error);
      });
      ```

      ```php PHP theme={null}
      $curl = curl_init();

      curl_setopt_array($curl, [
        CURLOPT_URL => "https://{yourDomain}/api/v2/tenants/settings",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => "",
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 30,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => "PATCH",
        CURLOPT_POSTFIELDS => "{"default_redirection_uri": "<login_url>"}",
        CURLOPT_HTTPHEADER => [
          "authorization: Bearer API2_ACCESS_TOKEN",
          "cache-control: no-cache",
          "content-type: application/json"
        ],
      ]);

      $response = curl_exec($curl);
      $err = curl_error($curl);

      curl_close($curl);

      if ($err) {
        echo "cURL Error #:" . $err;
      } else {
        echo $response;
      }
      ```

      ```python Python theme={null}
      import http.client

      conn = http.client.HTTPSConnection("")

      payload = "{"default_redirection_uri": "<login_url>"}"

      headers = {
          'content-type': "application/json",
          'authorization': "Bearer API2_ACCESS_TOKEN",
          'cache-control': "no-cache"
          }

      conn.request("PATCH", "/{yourDomain}/api/v2/tenants/settings", payload, headers)

      res = conn.getresponse()
      data = res.read()

      print(data.decode("utf-8"))
      ```

      ```ruby Ruby theme={null}
      require 'uri'
      require 'net/http'
      require 'openssl'

      url = URI("https://{yourDomain}/api/v2/tenants/settings")

      http = Net::HTTP.new(url.host, url.port)
      http.use_ssl = true
      http.verify_mode = OpenSSL::SSL::VERIFY_PEER

      request = Net::HTTP::Patch.new(url)
      request["content-type"] = 'application/json'
      request["authorization"] = 'Bearer API2_ACCESS_TOKEN'
      request["cache-control"] = 'no-cache'
      request.body = "{"default_redirection_uri": "<login_url>"}"

      response = http.request(request)
      puts response.read_body
      ```
    </AuthCodeGroup>
  </Tab>
</Tabs>

***

`login_url` は、最終的に Auth0 の `/authorize` エンドポイントにリダイレクトするアプリケーション内のルートを指す必要があります。たとえば `https://mycompany.org/login` です。なお、`https` が必須であり、`localhost` を指定することはできません。`login_url` にはクエリパラメータと URI フラグメントを含めることができます。

OIDC Third Party Initiated Login 仕様に従い、Issuer Identifier を含む `iss` パラメーターは、リダイレクト前に `login_url` にクエリ文字列パラメーターとして追加されます。

<div id="dynamic-login-uris-with-metadata-placeholders">
  ## メタデータプレースホルダーを含む動的なログイン URI
</div>

[複数のカスタムドメイン](/docs/ja-jp/customize/custom-domains/multiple-custom-domains) または [Organizations](/docs/ja-jp/manage-users/organizations/organizations-overview) を使用している場合は、アプリケーションレベルの `initiate_login_uri` にメタデータプレースホルダーを含めるよう設定できます。これらのメタデータプレースホルダーは、実行時に動的に解決されます。

<div id="supported-placeholders">
  ### サポートされているプレースホルダー
</div>

| Placeholder                    | Source                    | Example                                                   |
| ------------------------------ | ------------------------- | --------------------------------------------------------- |
| `{custom_domain.metadata.KEY}` | リクエストで使用されるカスタムドメインのメタデータ | `https://{custom_domain.metadata.public_app_host}/login`  |
| `{organization.metadata.KEY}`  | リクエストに関連付けられた組織のメタデータ     | `https://{organization.metadata.public_login_host}/login` |

メタデータキーは `public_` で始まる必要があります (例: `public_app_host`) 。リクエストにカスタムドメインと組織コンテキストの両方が含まれる場合は、同じ URI 内で両方の種類のプレースホルダーを組み合わせて使用できます。

検証ルールと制限事項の一覧については、[カスタムドメイン URL プレースホルダー](/docs/ja-jp/get-started/applications/wildcards-for-subdomains#custom-domain-url-placeholders)を参照してください。

<Note>
  メタデータプレースホルダーは、テナントレベルの `default_redirection_uri` ではなく、アプリケーションレベルの `initiate_login_uri` でのみサポートされています。
</Note>

<div id="fallback-behavior">
  ### フォールバック時の動作
</div>

プレースホルダーを解決できない場合、Auth0 はテナントレベルの `default_redirection_uri` にフォールバックします。たとえば、組織が不明な場合や、メタデータのキーが存在しない場合です。`default_redirection_uri` も設定されていない場合、Auth0 はエラーページをレンダリングします。確実なフォールバック先として、テナントレベルの `default_redirection_uri` を設定することをお勧めします。

<div id="redirect-default-login-route-scenarios">
  ## デフォルトのログインルートにリダイレクトされるケース
</div>

<div id="users-bookmark-login-page">
  ### ユーザーがログインページをブックマークする
</div>

アプリケーションがログインプロセスを開始すると、[必要なパラメーター](https://auth0.com/docs/api/authentication#login)を付けて `https://{yourDomain}/authorize` に遷移します。続いて Auth0 は、次のような URL の `https://{yourDomain}/login` ページへエンドユーザーをリダイレクトします。

`https://{yourDomain}/login?state=g6Fo2SBjNTRyanlVa3ZqeHN4d1htTnh&...`

`state` パラメーターは、認可トランザクションの status を追跡する内部データベース内の record を指します。トランザクションが完了したとき、または一定時間が経過した後、その record は内部データベースから削除されます。

Organizations を使用していて、エンドユーザーが organization のログイン prompt をブックマークした場合、Auth0 はユーザーをデフォルトのログインルートにリダイレクトする際に `organization` パラメーターも含めます。

ユーザーがログインページをブックマークしている場合、ブックマークした `/login` URL にアクセスした時点ではトランザクションの record がすでに存在せず、Auth0 がログインフローを続行できないことがあります。その場合、Auth0 は、設定されていればデフォルトのクライアント URL に、設定されていなければ tenant レベルの URL にリダイレクトします。デフォルトのログイン URL が設定されていない場合、Auth0 はエラーページをレンダリングします。

<div id="complete-password-reset-flow">
  ### パスワードリセットフローの完了
</div>

パスワードリセットフローの完了後、アプリケーションまたはテナントのデフォルトURIが設定されている場合、ユーザーにはログインページに戻るためのボタンが表示されます。

この動作が発生するのは、<Tooltip tip="アプリケーションは、ユーザーの本人確認のために、Auth0 の認可サーバーでホストされている Universal Login にリダイレクトします。" cta="用語集を見る" href="/docs/ja-jp/glossary?term=Universal+Login">Universal Login</Tooltip> エクスペリエンスを有効にしている場合のみです。クラシックログインでは、Change Password テンプレートでリダイレクトURLを設定する必要があります。詳しくは、[メールテンプレートをカスタマイズする](/docs/ja-jp/customize/email/email-templates)を参照してください。

Universal Login を使用しているテナントでは、[`/post-password-change`](https://auth0.com/docs/api/management/v2/#!/Tickets/post_password_change)エンドポイントで、ユーザーを特定のアプリケーションにリダイレクトして戻すことができます。`client_id` が指定され、アプリケーションのログインURIが設定されている場合、ユーザーにはパスワードリセットの完了後にアプリケーションへ戻るためのボタンが表示されます。

<AuthCodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://{yourDomain}/api/v2/tickets/password-change' \
    --header 'authorization: Bearer MGMT_API_ACCESS_TOKEN' \
    --header 'content-type: application/json' \
    --data '{ "user_id": "A_USER_ID", "client_id": "A_CLIENT_ID" }'
  ```

  ```csharp C# theme={null}
  var client = new RestClient("https://{yourDomain}/api/v2/tickets/password-change");
  var request = new RestRequest(Method.POST);
  request.AddHeader("content-type", "application/json");
  request.AddHeader("authorization", "Bearer MGMT_API_ACCESS_TOKEN");
  request.AddParameter("application/json", "{ "user_id": "A_USER_ID", "client_id": "A_CLIENT_ID" }", ParameterType.RequestBody);
  IRestResponse response = client.Execute(request);
  ```

  ```go Go theme={null}
  package main

  import (
  	"fmt"
  	"strings"
  	"net/http"
  	"io/ioutil"
  )

  func main() {

  	url := "https://{yourDomain}/api/v2/tickets/password-change"

  	payload := strings.NewReader("{ "user_id": "A_USER_ID", "client_id": "A_CLIENT_ID" }")

  	req, _ := http.NewRequest("POST", url, payload)

  	req.Header.Add("content-type", "application/json")
  	req.Header.Add("authorization", "Bearer MGMT_API_ACCESS_TOKEN")

  	res, _ := http.DefaultClient.Do(req)

  	defer res.Body.Close()
  	body, _ := ioutil.ReadAll(res.Body)

  	fmt.Println(res)
  	fmt.Println(string(body))

  }
  ```

  ```java Java theme={null}
  HttpResponse<String> response = Unirest.post("https://{yourDomain}/api/v2/tickets/password-change")
    .header("content-type", "application/json")
    .header("authorization", "Bearer MGMT_API_ACCESS_TOKEN")
    .body("{ "user_id": "A_USER_ID", "client_id": "A_CLIENT_ID" }")
    .asString();
  ```

  ```javascript Node.JS theme={null}
  var axios = require("axios").default;

  var options = {
    method: 'POST',
    url: 'https://{yourDomain}/api/v2/tickets/password-change',
    headers: {
      'content-type': 'application/json',
      authorization: 'Bearer MGMT_API_ACCESS_TOKEN'
    },
    data: {user_id: 'A_USER_ID', client_id: 'A_CLIENT_ID'}
  };

  axios.request(options).then(function (response) {
    console.log(response.data);
  }).catch(function (error) {
    console.error(error);
  });
  ```

  ```php PHP theme={null}
  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://{yourDomain}/api/v2/tickets/password-change",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => "{ "user_id": "A_USER_ID", "client_id": "A_CLIENT_ID" }",
    CURLOPT_HTTPHEADER => [
      "authorization: Bearer MGMT_API_ACCESS_TOKEN",
      "content-type: application/json"
    ],
  ]);

  $response = curl_exec($curl);
  $err = curl_error($curl);

  curl_close($curl);

  if ($err) {
    echo "cURL Error #:" . $err;
  } else {
    echo $response;
  }
  ```

  ```python Python theme={null}
  import http.client

  conn = http.client.HTTPSConnection("")

  payload = "{ "user_id": "A_USER_ID", "client_id": "A_CLIENT_ID" }"

  headers = {
      'content-type': "application/json",
      'authorization': "Bearer MGMT_API_ACCESS_TOKEN"
      }

  conn.request("POST", "/{yourDomain}/api/v2/tickets/password-change", payload, headers)

  res = conn.getresponse()
  data = res.read()

  print(data.decode("utf-8"))
  ```

  ```ruby Ruby theme={null}
  require 'uri'
  require 'net/http'
  require 'openssl'

  url = URI("https://{yourDomain}/api/v2/tickets/password-change")

  http = Net::HTTP.new(url.host, url.port)
  http.use_ssl = true
  http.verify_mode = OpenSSL::SSL::VERIFY_PEER

  request = Net::HTTP::Post.new(url)
  request["content-type"] = 'application/json'
  request["authorization"] = 'Bearer MGMT_API_ACCESS_TOKEN'
  request.body = "{ "user_id": "A_USER_ID", "client_id": "A_CLIENT_ID" }"

  response = http.request(request)
  puts response.read_body
  ```
</AuthCodeGroup>

<div id="complete-email-verification-flow">
  ### メールアドレス確認フロー全体
</div>

サインアップ プロセスの一環として、識別子にメールアドレスを選択したユーザーには、メールアドレスを確認するためのメールが送信されます。ユーザーがそのリンクをクリックすると、メールアドレスの確認が完了したことを示すページが表示され、アプリケーションに戻るためのボタンが表示されます。そのボタンをクリックすると、ユーザーはログインページにリダイレクトされ、すでに有効なセッションがある場合は、そのままアプリケーションにリダイレクトされます。

この動作は、Universal Login エクスペリエンスが有効な場合にのみ発生します。クラシックログインを使用している場合は、確認メールテンプレートでリダイレクト URL を設定する必要があります。

<div id="invite-organization-members">
  ### 組織メンバーを招待する
</div>

ユーザーが[組織](/docs/ja-jp/manage-users/organizations/organizations-overview)への参加に招待されると、招待リンクがメールで送信されます。ユーザーがそのリンクを選択すると、招待固有のパラメーターが追加された、設定済みのデフォルトのログインルートにリダイレクトされます。

たとえば、**Application Login URI** が `https://myapp.com/login` に設定された組織対応のアプリケーションがある場合、エンドユーザーがメールの招待で受け取るリンクは `https://myapp.com/login?invitation={invitation_ticket_id}&organization={organization_id}&organization_name={organization_name}` になります。

したがって、アプリケーション内のそのルートは、クエリ文字列を通じて `invitation` と `organization` の両方のパラメーターを受け取れる必要があります。招待受諾トランザクションを開始するには、それら2つのパラメーターをエンドユーザーとともに Auth0 の `/authorize` エンドポイントに転送する必要があります。

<div id="disabled-cookies">
  ### Cookie が無効な場合
</div>

ユーザーがブラウザーで Cookie を無効にした状態で `https://{yourDomain}/authorize` にアクセスすると、Auth0 はユーザーを Application Login URI にリダイレクトします。Application Login URI が設定されていない場合は、代わりにテナントの login URI にリダイレクトされます。

ユーザーをログインページに戻すと、リダイレクトループが発生する可能性があります。この問題を回避するには、ランディングページを使用して Cookie が利用可能かどうかを確認し、無効になっている場合は、続行するには有効にする必要があることをユーザーに知らせてください。

<div id="learn-more">
  ## 詳細はこちら
</div>

* [メールテンプレートをカスタマイズする](/docs/ja-jp/customize/email/email-templates)
* [Authentication API で認証要素を管理する](/docs/ja-jp/secure/multi-factor-authentication/manage-mfa-auth0-apis/manage-authenticator-factors-mfa-api)
