Skip to content

Support camera access in the create-credential auth WebView - #53

Open
nesfeder-proof wants to merge 1 commit into
digitalcredentialsdev:mainfrom
nesfeder-proof:fix/auth-webview-camera-permission
Open

Support camera access in the create-credential auth WebView#53
nesfeder-proof wants to merge 1 commit into
digitalcredentialsdev:mainfrom
nesfeder-proof:fix/auth-webview-camera-permission

Conversation

@nesfeder-proof

Copy link
Copy Markdown

Issuer authorization pages that run identity verification use getUserMedia, but the auth WebView has no WebChromeClient, so camera permission requests are silently denied and capture hangs.

This declares the CAMERA permission and grants VIDEO_CAPTURE requests, prompting the user for the runtime permission in context on first use and queueing requests that arrive while the dialog is showing. All other resource types (mic, DRM, MIDI) are still denied, matching the platform default when no WebChromeClient is set.

Issuer authorization pages that run identity verification use
getUserMedia for document and selfie capture. The auth WebView has no
WebChromeClient, so page permission requests are silently denied and
capture hangs.

Declare the CAMERA permission and handle the WebView's VIDEO_CAPTURE
permission requests: grant when the app already holds the runtime
permission, otherwise ask the user first and answer the page from the
dialog result. Requests that arrive while the dialog is showing are
queued and answered together. All other resource types are denied.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant