Documentation Hub
Web SDK
Web SDK
  • Keyless Web SDK Documentation
  • Introduction
    • Components
    • Integration Flows
  • Web SDK Guide
    • Getting Started
    • Enrollment
    • Authentication
    • Browser Requirements
  • Web SDK Reference
    • UI Customization
    • Localization
    • Lockout Policy
    • Error Handling
    • Camera Permission Flow
    • Signing Transactions
Powered by GitBook
On this page

Was this helpful?

  1. Web SDK Reference

Camera Permission Flow

Last updated 2 months ago

Was this helpful?

In order to provide a better user experience we include a page that takes care of explaining why the camera permission must be granted, and to block the user attempt to authenticate or enroll if they have already denied the camera permission.

The underlying logic uses the to check if the user has granted the camera permission or not.

Note, this API is not supported by some older browsers, therefore we implemented a secondary flow to perform this check. In these instances the user will always see the camera permission page the first time they use the Web SDK on that website, but the check will still be performed in an elegant way. The result of this check will be stored in the sessions torage.

The camera permission page can always be skipped by setting the aforementioned session storage item, we expose a function from the @keyless/sdk-web package called setKeylessCameraPermissionStorageItem which accepts an object with the following structure:

Key

Type

state

"denied" | "granted"

The session storage item can also be manually set without using this function, the key of the item is kl-camera-permission .

It is highly recommended to use our setKeylessCameraPermissionStorageItem function.

Permissions query method