キオスクモードの検出
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
PWA キオスクアプリには、Chrome Verified Access API を使用して ChromeOS キオスクの検出機能を実装できます。これは既存の Verified Access API テクノロジー上に構築されています。ただし、このガイドで説明する重要な相違点はいくつかあります。
設定
Verified Access API を使用してキオスクモードの検出を行うために必要な設定手順は、確認済みアクセスの前提条件にある手順と同じです。管理対象の Chromebook デバイスでキオスクアプリを設定して起動するには、追加の手順が必要です。
Google 管理コンソールで、次の操作を行います。
- このガイドに沿ってキオスクアプリをインストールし(ステップ 1)、コンパニオン拡張機能をキオスクアプリに追加します(ステップ 3)。
- キオスク コンパニオン拡張機能では、[証明書の管理] で [企業の本人確認を許可する] の設定を有効にします。
実装
確認付きアクセスのキオスク検出を実装する主なコンポーネントには、PWA キオスクアプリ、コンパニオン Chrome 拡張機能、ネットワーク サービスの 3 つがあります。
PWA キオスクアプリ
PWA はメインのキオスクアプリです。キオスクモードの検出プロセスを開始するには、コンパニオン拡張機能にメッセージを送信して、検証プロセスの開始を通知します。
コンパニオン Chrome 拡張機能
コンパニオン Chrome 拡張機能はキオスク PWA で実行され、PWA からの受信メッセージをリッスンします。検証プロセス開始のメッセージを受信すると
- Verified Access API を呼び出してチャレンジを作成する
- 生成されたチャレンジで enterprise.platformKeys API を呼び出し、エンタープライズ ユーザーキー(ユーザーは
"USER"
スコープ)を使用してチャレンジ レスポンスを作成します。
- チャレンジ / レスポンスを含むリクエストを、検証対象のネットワーク サービスに送信する
詳細とコードサンプルについては、デベロッパー ガイドをご覧ください。
ネットワーク サービス
ネットワーク サービスが拡張機能からチャレンジ レスポンスの検証リクエストを受信したら、verify メソッドを使用します。キオスクモードを検出するには、expectedIdentity
を "KIOSK_MODE"
に設定します。成功すると、空の文字列または空の JSON(デバイスがキオスクモード)であるレスポンス本文が表示されます。デバイスがキオスクモードでない場合、レスポンスの本文で 404 コードとエラー メッセージ "Requested entity was not found"
が返されます。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[[["\u003cp\u003ePWA kiosk apps can utilize the Chrome Verified Access API to detect if a ChromeOS device is in kiosk mode.\u003c/p\u003e\n"],["\u003cp\u003eSetup involves configuring your kiosk app and companion extension in the Google Admin Console, enabling specific settings for enterprise challenge.\u003c/p\u003e\n"],["\u003cp\u003eImplementation requires a PWA kiosk app to initiate verification, a companion Chrome extension to handle the API calls and communication with the network service, and a network service to verify the device's kiosk mode status.\u003c/p\u003e\n"],["\u003cp\u003eThe verification process leverages the Verified Access API to create and validate a challenge-response, confirming kiosk mode if successful.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers should refer to the provided guides and documentation for detailed instructions and code samples to implement this functionality.\u003c/p\u003e\n"]]],[],null,["# Kiosk mode detection\n\nPWA kiosk apps can implement ChromeOS kiosk detection with the Chrome Verified\nAccess API. It builds on the existing Verified Access API technology with just\na few key differences detailed in this guide.\n\nSetup\n-----\n\nThe setup steps needed for using the Verified Access API to do kiosk mode\ndetection are the same as those listed in the\n[prerequisites for Verified Access](/chrome/verified-access/developer-guide#prerequisites_to_verified_access).\nThere are some additional\nsteps to setup and launch your kiosk app on the managed Chromebook device.\n\nIn the [Google Admin Console](https://admin.google.com/), do the following:\n\n- Follow [this guide](https://support.google.com/chrome/a/answer/9781496) to install your kiosk app (step 1) and add your companion extension to the kiosk app (step 3).\n- For the kiosk companion extension, enable the **Allow enterprise challenge** setting under **Certificate management**\n\nImplementation\n--------------\n\nThere are three main components to implement Verified Access kiosk detection: a\nPWA kiosk app, companion Chrome extension, and network service.\n\n### PWA kiosk app\n\nThe PWA is your main kiosk app. It kicks off the process of kiosk mode detection\nby [sending a message to the companion extension](https://chromeos.dev/en/kiosk/connecting-an-extension-from-a-kiosk-pwa),\nletting it know to start the verification process.\n\n### Companion Chrome extension\n\nThe companion Chrome extension runs with the kiosk PWA and should listen to\nincoming messages from the PWA. Upon receiving the message to start the\nverification process,\n\n1. Call the Verified Access API to create a challenge\n2. Call the enterprise.platformKeys API on the generated challenge to create a challenge-response with an Enterprise User Key (user the `\"USER\"` scope)\n3. Send a request with the challenge-response to the network service to be verified\n\nRefer to the [developer guide](/chrome/verified-access/developer-guide)\nfor more information and code samples.\n\n### Network service\n\nWhen your network service receives the request from the extension to verify the\nchallenge-response, use the\n[verify](/chrome/verified-access/reference/rest/v2/challenge/verify) method. For\nkiosk mode detection, set `expectedIdentity` to `\"KIOSK_MODE\"`. If successful,\nyou should see a response body of an empty string or empty JSON, meaning the\ndevice is in kiosk mode. If the device is not in kiosk mode, a 404 code is\nreturned in the response body with error message\n`\"Requested entity was not found\"`."]]