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

# バックチャネルログインフロー - ステータス確認

> バックチャネルログインフローのステータスを確認するには、以下を渡して、`/oauth/token`エンドポイントを一定の間隔でポーリングします。

`POST /oauth/token`

バックチャネルログインフローのステータスを確認するには、以下を渡して、`/oauth/token`エンドポイントを一定の間隔でポーリングします。

* `/bc-authorize`の呼び出しで返された`auth_req_id`
* `urn:openid:params:grant-type:ciba`の付与タイプ

### 要求本文

認可しているユーザーがまだ要求の承認や拒否を行っていない場合は、以下のような応答を受け取ります。

```
{
  "error": "authorization_pending",
  "error_description": "The end-user authorization is pending"
}
```

認可しているユーザーが要求を拒否した場合は、以下のような応答を受け取ります。

```
{
  "error": "access_denied",
  "error_description": "The end-user denied the authorization request or it has been expired"
}
```

ポーリングが早すぎる（`/bc-authorize`から返された間隔値よりも少ない）場合は、以下のような応答を受け取ります。

```
{
  "error": "slow_down",
  "error_description": "You are polling faster than allowed. Try again in 10 seconds."
}
```

また、Auth0は応答に[Retry-After](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After)ヘッダーを追加して、必要なポーリングの待機時間を秒単位で示します。ポーリングの頻度が多すぎるまま続くと、秒単位のポーリング待機時間が増加します。

認可しているユーザーがプッシュ通知を承認すると、呼び出しがIDトークンとアクセストークン（場合によってはリフレッシュトークンも含む）を返します。

```
{
  "access_token": "eyJh...",
  "id_token": "eyJh...",
  "expires_in": 86400,
  "scope": "openid"
}
```

IDトークンまたはアクセストークンと交換した`auth_req_id`は、それ以降使用できなくなります。

### 備考

要求にアプリケーション認証の任意のパラメーターを含めます。

* HTTP Basic認証でのクライアントシークレット：パラメーターは必要ありません。`client_id`と`client_secret`がヘッダーで渡されます。
* クライアントシークレットのPost：`client_id`と`client_secret`が必要です。
* 秘密鍵JWT：`client_id`、`client_assertion`と`client_assertion`のタイプが必要です。
* mTLS：`client_id`パラメーター、`client-certificate`と`client-certificate-ca-verified`のヘッダーが必要です。

## Parameters

<ParamField query="client_id" type="string" required>
  アプリケーションの`client_id`です。
</ParamField>

<ParamField query="auth_req_id" type="string" required>
  `/bc-authorize`エンドポイントから返された`auth_req_id`です。
</ParamField>

<ParamField query="grant_type" type="string" required>
  `urn:openid:params:grant-type:ciba`に設定する必要があります。
</ParamField>

## Response

| Status | Description         |
| ------ | ------------------- |
| 200    | 認証ステータスが返されました。     |
| 400    | 不正な要求 - 無効なパラメーターです |
| 500    | 内部サーバーエラーです         |
