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

# OIDCにおけるリフレッシュトークン

> OIDC準拠のパイプラインがリフレッシュトークンの使用にどのような影響を与えるのかについて説明します。

OIDC準拠のパイプラインでは、リフレッシュトークンは以下のようになります。

* [暗黙付与](/docs/ja-JP/ja-jp/get-started/authentication-and-authorization-flow/implicit-flow-with-form-post)タイプの認証では返されなくなります。
* [機密アプリケーション](/docs/ja-JP/ja-jp/get-started/applications/confidential-and-public-applications)で使用できます。
* PKCEを使用した認可コードフローでは、公開アプリケーションによる[リフレッシュトークンのローテーション](/docs/ja-JP/ja-jp/secure/tokens/refresh-tokens/refresh-token-rotation)に使用できます。
* 新しいトークンの取得には、[`/oauth/token`](/docs/ja-JP/ja-jp/api/authentication#refresh-token)エンドポイントを使用しなければなりません。これは、[`/delegation`](/docs/ja-JP/ja-jp/api/authentication#delegation)エンドポイントが廃止されたためです。

また、リフレッシュトークンの構造にも違いがあります。詳細については、「[リフレッシュトークン](/docs/ja-JP/ja-jp/secure/tokens/refresh-tokens)」をお読みください。

<div id="legacy-delegation">
  ## レガシー（委任）
</div>

```json lines theme={null}
POST /delegation
Content-Type: 'application/json'
{
  "grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer",
  "client_id": "...",
  "refresh_token": "...",
  "scope": "openid profile"
}
```

<div id="oidc-conformant-token-endpoint">
  ## OIDC準拠（トークンエンドポイント）
</div>

```http lines theme={null}
POST /oauth/token
Content-Type: application/x-www-form-urlencoded
grant_type=refresh_token&refresh_token=123&client_id=123&client_secret=123&scope=openid+profile&audience=https%3A%2F%2Fapi.example.com
```

* `audience`と`client_secret`パラメーターは任意です。
* `client_secret`は、公開アプリケーションが`refresh_token`でトークン要求を行う際には必要ありません。

<Warning>
  リフレッシュトークンは、転送・保管時に機密に保たなければならず、認可サーバーと、リフレッシュトークンの発行先クライアントの間でのみ共有します。
</Warning>

<div id="learn-more">
  ## もっと詳しく
</div>

* [OIDCにおけるアクセストークン](/docs/ja-JP/ja-jp/authenticate/login/oidc-conformant-authentication/oidc-adoption-access-tokens)
* [OIDCを持つ外部API](/docs/ja-JP/ja-jp/authenticate/login/oidc-conformant-authentication/oidc-adoption-apis)
* [OIDCを使った認可コードフロー](/docs/ja-JP/ja-jp/authenticate/login/oidc-conformant-authentication/oidc-adoption-auth-code-flow)
* [OIDCを使用したクライアントの資格情報フロー](/docs/ja-JP/ja-jp/authenticate/login/oidc-conformant-authentication/oidc-adoption-client-credentials-flow)
* [OIDCを使用した委任](/docs/ja-JP/ja-jp/authenticate/login/oidc-conformant-authentication/oidc-adoption-delegation)
* [OIDCを使った暗黙フロー](/docs/ja-JP/ja-jp/authenticate/login/oidc-conformant-authentication/oidc-adoption-implicit-flow)
