> ## 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="/ja/docs/glossary?term=refresh+tokens">リフレッシュトークン</Tooltip>に関して次の変更があります。

* 認証に [implicit grant](/ja/docs/get-started/authentication-and-authorization-flow/implicit-flow-with-form-post) を使用した場合、返されなくなります。
* [confidential applications](/ja/docs/get-started/applications/confidential-and-public-applications) で使用できます。
* 公開アプリケーションでも、Authorization Code Flow with PKCE を使用する場合は [Refresh Token Rotation](/ja/docs/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) エンドポイントを使用する必要があります。

また、リフレッシュトークンの構造にも違いがあります。詳しくは、[Refresh Tokens](/ja/docs/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におけるアクセストークン](/ja/docs/authenticate/login/oidc-conformant-authentication/oidc-adoption-access-tokens)
* [OIDCにおける外部API](/ja/docs/authenticate/login/oidc-conformant-authentication/oidc-adoption-apis)
* [OIDCにおけるAuthorization Codeフロー](/ja/docs/authenticate/login/oidc-conformant-authentication/oidc-adoption-auth-code-flow)
* [OIDCにおけるClient Credentialsフロー](/ja/docs/authenticate/login/oidc-conformant-authentication/oidc-adoption-client-credentials-flow)
* [OIDCにおける委任](/ja/docs/authenticate/login/oidc-conformant-authentication/oidc-adoption-delegation)
* [OIDCにおけるImplicitフロー](/ja/docs/authenticate/login/oidc-conformant-authentication/oidc-adoption-implicit-flow)
