Camera Permission Flow

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 Permissions query method 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.

Last updated

Was this helpful?