> ## 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 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) + "*****マスク済み*****";
          }
          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>;
};

export const codeExample = `const auth0 = await createAuth0Client({
  domain: '{yourDomain}',
  client_id: '{yourClientId}',
  audience: '{yourApiIdentifier}',
  useRefreshTokens: false
});`;

Dashboard または <Tooltip tip="Refresh Token: ユーザーに再度ログインを求めることなく、新しい Access Token を取得するために使用されるトークン。" cta="用語集を見る" href="/ja/docs/glossary?term=Management+API">Management API</Tooltip> を使用して、アプリケーションごとに <Tooltip tip="Refresh Token: ユーザーに再度ログインを求めることなく、新しい Access Token を取得するために使用されるトークン。" cta="用語集を見る" href="/ja/docs/glossary?term=refresh+token">リフレッシュトークン</Tooltip> のローテーションを無効にできます。

<div id="disable-with-the-dashboard">
  ## Dashboardで無効にする
</div>

1. [Auth0 Dashboard](https://manage.auth0.com/#) で **Applications > Applications** に移動し、設定するアプリケーションを選択します。
2. Settings タブで リフレッシュトークンのローテーション セクションを見つけ、Allow Refresh Token Rotation トグルをオフにします。
3. 画面下部の **Save Changes** を選択します。

<div id="disable-with-the-management-api">
  ## Management API を使用して無効にする
</div>

1. Management API を使用して、各アプリケーションのリフレッシュトークンのローテーションを無効にします。

   <AuthCodeBlock children={codeExample} language="javascript" />

2. ローテーションしないリフレッシュトークンの設定を、次のように構成します。

   ```http lines theme={null}
   PATCH /api/v2/clients/{client_id}
   {
      "refresh_token": {
        "rotation_type": "non-rotating",
        "expiration_type": "non-expiring"
      }
   }
   ```

<div id="learn-more">
  ## 詳しく見る
</div>

* [リフレッシュトークンのローテーション](/ja/docs/secure/tokens/refresh-tokens/refresh-token-rotation)
* [リフレッシュトークンのローテーション を設定する](/ja/docs/secure/tokens/refresh-tokens/configure-refresh-token-rotation)
* [リフレッシュトークンのローテーション を利用する](/ja/docs/secure/tokens/refresh-tokens/use-refresh-token-rotation)
