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

# 認可

> これはAPIにアクセスするためにWebアプリが使用するOAuth 2.0権限付与です。

`GET /authorize`

これはAPIにアクセスするためにWebアプリが使用するOAuth 2.0権限付与です。

### 応答

#### 302

要求が成功すると、ユーザーが指定されたCallback URLにアクセストークンと一緒にリダイレクトされます。
HTTP/1.1 302 FoundLocation: \${account.callback}#access\_token=TOKEN\&state=STATE\&token\_type=TYPE\&expires\_in=SECONDS

### 備考

* `redirect_uri`の値は、[アプリケーションの設定](https://manage.auth0.com/dashboard)で有効なCallback URLとして指定される必要があります。
* `response_type=token`の場合は、ユーザーがプロバイダーで認証すると、ユーザーがアプリケーションのCallback URLにリダイレクトされ、その際にアドレス内の`location.hash`で`access_token`が渡されます。これは、シングルページアプリおよびネイティブモバイルSDKに使用されます。
* 暗黙的付与は、リフレッシュトークンの発行をサポートしません。代わりに[サイレント認証](https://auth0.com/docs/ja-jp/authenticate/login/configure-silent-authentication)を使用します。
* アプリケーションの互換性を高めるために、Auth0は[OIDC仕様が定義する構造化されたクレームの形式](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims)で、プロファイル情報を返します。そのため、IDトークンまたはアクセストークンにカスタムクレームを追加するためには、標準のOIDCクレームとの衝突を避けるために、[名前空間形式](https://auth0.com/docs/ja-jp/secure/tokens/json-web-tokens/create-custom-claims)に従わなければなりません。
* サイレント認証は認証フローを実行できるようにします。そのフローではAuth0はリダイレクトでのみ応答し、ログインページでは応答しません。アクセストークンの有効期限が切れていて、ユーザーのシングルサインオン（SSO）セッションの有効期限が切れていない場合、サイレント認証を使用して、ユーザーと対話することなく、新しいアクセストークンを取得できます。

### 詳しく学ぶ

* [暗黙フロー](/docs/ja-jp/api/authentication/flows/concepts/implicit)
* [状態パラメーター](/docs/ja-jp/api/authentication/protocols/oauth2/oauth-state)
* [暗黙的付与使用時のリプレイ攻撃を緩和する](/docs/ja-jp/api/authentication/api-auth/tutorials/nonce)
* [サイレント認証](https://auth0.com/docs/ja-jp/authenticate/login/configure-silent-authentication)

## Parameters

<ParamField query="audience" type="string">
  アクセスしたいターゲットAPIの一意の識別子です。
</ParamField>

<ParamField query="scope" type="string">
  認可を要求するスコープ。スペースで区切る必要があります。
</ParamField>

<ParamField query="response_type" type="string" required>
  これで、フローの終了時に受け取るトークンの種類が指定されます。アクセストークンのみを取得するために`token`を、IDトークンのみを取得するために`id_token`を、両方のトークンを取得するために`id_token token`を使用します。
</ParamField>

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

<ParamField query="state" type="string">
  CSRF攻撃を防止する不透明な値です。
</ParamField>

<ParamField query="redirect_uri" type="string">
  認可後にAuth0がブラウザーをリダイレクトする先のURLです。
</ParamField>

<ParamField query="nonce" type="string">
  トークンのリプレイ攻撃を防止するためにIDトークンレスポンスに含まれる文字列値です。
</ParamField>

<ParamField query="connection" type="string">
  アプリケーションに構成されている接続の名前です。
</ParamField>

<ParamField query="prompt" type="string">
  サイレント認証の要求を開始するには、`prompt=none`を使用します。
</ParamField>

<ParamField query="organization" type="string">
  ユーザーを認証する際に使う組織のIDです。
</ParamField>

<ParamField query="invitation" type="string">
  組織の招待のチケットIDです。
</ParamField>

## Response

| Status | Description                              |
| ------ | ---------------------------------------- |
| 302    | 指定されたCallback URLにアクセストークンと一緒にリダイレクトします。 |
