> ## 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.

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

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

OIDC 準拠パイプラインでは、<Tooltip tip="リフレッシュトークン: ユーザーに再度ログインを求めることなく、新しいアクセストークンを取得するために使用されるトークンです。" cta="用語集を見る" href="/docs/ja-jp/glossary?term=refresh+tokens">リフレッシュトークン</Tooltip> について次のような変更があります。

* 認証に [インプリシットグラント](/docs/ja-jp/get-started/authentication-and-authorization-flow/implicit-flow-with-form-post) を使用した場合、返されなくなります。
* [機密アプリケーション](/docs/ja-jp/get-started/applications/confidential-and-public-applications) で使用できます。
* パブリックアプリケーションが PKCE を使用した Authorization Code フローを使用する場合、[Refresh Tokenのローテーション](/docs/ja-jp/secure/tokens/refresh-tokens/refresh-token-rotation) と併用できます。
* [`/delegation`](https://auth0.com/docs/api/authentication#delegation) エンドポイントは非推奨であるため、新しいトークンを取得するには [`/oauth/token`](https://auth0.com/docs/api/authentication#refresh-token) エンドポイントを使用する必要があります。

また、リフレッシュトークンの構造にも違いがあります。詳しくは、[リフレッシュトークン](/docs/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` のパラメーターは省略可能です。
* パブリックアプリケーションの `refresh_token` をリクエストする場合、`client_secret` は不要です。

<Warning>
  リフレッシュトークンは、送信時と保存時の両方で機密として扱う必要があり、認可サーバーと、そのリフレッシュトークンの発行先であるクライアント以外と共有すべきではありません。
</Warning>

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

* [OIDC でのアクセストークン](/docs/ja-jp/authenticate/login/oidc-conformant-authentication/oidc-adoption-access-tokens)
* [OIDC での外部 API](/docs/ja-jp/authenticate/login/oidc-conformant-authentication/oidc-adoption-apis)
* [OIDC での認可コードフロー](/docs/ja-jp/authenticate/login/oidc-conformant-authentication/oidc-adoption-auth-code-flow)
* [OIDC でのクライアント認証情報フロー](/docs/ja-jp/authenticate/login/oidc-conformant-authentication/oidc-adoption-client-credentials-flow)
* [OIDC での委譲](/docs/ja-jp/authenticate/login/oidc-conformant-authentication/oidc-adoption-delegation)
* [OIDC での Implicit Flow](/docs/ja-jp/authenticate/login/oidc-conformant-authentication/oidc-adoption-implicit-flow)
