> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev-fix-docs-5528-php-updates.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) + "*****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>;
};

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

Dashboardまたは<Tooltip data-tooltip-id="react-containers-DefinitionTooltip-0" href="/docs/ja-jp/glossary?term=management-api" tip="Management API: 顧客が管理タスクを実行できるようにするための製品。" cta="用語集の表示">Management API</Tooltip>を使用して各アプリケーションのリフレッシュトークンのローテーションを無効にできます。

## Dashboardでの無効化

1. [Auth0 Dashboard](https://manage.auth0.com/#)から **［Applications（アプリケーション）］>［Applications（アプリケーション）］** に移動して、構成するアプリケーションを選択します。
2. ［Settings（設定）］タブの［Refresh Token Rotation（リフレッシュトークンのローテーション）］セクションにある［Allow Refresh Token Rotation（リフレッシュトークンのローテーションを許可する）］トグルを無効にします。
3. 画面の下部にある **［Save Changes（変更を保存）］** をクリックします。

## Management APIでの無効化

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"
      }
   }
   ```

## もっと詳しく

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