Camera permission flow
By default, PingOne Recognize Web SDK displays a camera permissions page during authentication and enrollment. The page explains the need for permissions and blocks further action when the user declines camera access.
The access check uses the Permissions.query method to determine camera access. Learn more in the Mozilla reference page.
If the Permissions API is not supported in the user’s browser, PingOne Recognize uses an alternate approach that displays the camera permissions check the first time they open a page using the Web SDK. Results are saved in browser session storage.
You can skip the permissions check by setting the session storage value directly, either programmatically or manually.
The @keyless/sdk-web package exposes the setKeylessCameraPermissionStorageItem function. Use this to set the state key to one of the following values:
| Value | Description |
|---|---|
|
Access to the camera is denied |
|
Access to the camera is allowed |
The session storage value can also be set manually. To do this, update the kl-camera-permission key.
To avoid common errors, you should use the setKeylessCameraPermissionStorageItem function instead of setting the value manually.