Skip to content

Combine simple consent and biometric authentication on Android. - #2171

Merged
davidz25 merged 1 commit into
mainfrom
combine-consent-and-biometric
Nov 9, 2026
Merged

davidz25 merged 1 commit into
mainfrom
combine-consent-and-biometric

Conversation

@davidz25

@davidz25 davidz25 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Introduce SimpleConsent, SimpleConsentClaim (covering AgeOver, AgeOverAndPortrait, NotAgeOver, NotAgeOverAndPortrait, AgeInYears, AgeInYearsAndPortrait, AgeBirthYear, and AgeBirthYearAndPortrait), ClassifySimpleConsentFn, and defaultClassifySimpleConsent() to classify non-PII age-verification requests that can be combined with biometric authentication.

Add SimpleConsentPromptData, resolveSimpleConsentPromptData(), and SimpleConsentPrompt() in multipaz-compose to resolve and render a compact consent summary displaying the relying party icon, localized age request heading, a circular top-right cancel button, and an inline summary with the wallet app icon, bold app name, card art, bold document name, shared claim summary, and a "More details" link to expand the full consent sheet.

Bump Android compileSdk to API 37.2, add PlatformConsentOptions (defaulting showOnBiometricPrompt to true on Android) and PresentmentSelection.preloadedKeyUnlockData (consumed by mdocPresentment()), and integrate Android's EmbeddedBiometricPrompt in ConsentModalBottomSheet() via ConsentEmbeddedBiometricPrompt() with BiometricManager.canAuthenticate() verification and LSKF fallback via the "Use PIN" negative button.

Add update-biometric-goldens.sh and 8 Android 17 QPR2 biometric prompt golden screenshots under 10_biometric_prompt/, and update ConsentPromptScreen(), the golden screenshot catalog, and unit tests.

Fixes #2170.

Introduce `SimpleConsent`, `SimpleConsentClaim` (covering `AgeOver`,
`AgeOverAndPortrait`, `NotAgeOver`, `NotAgeOverAndPortrait`,
`AgeInYears`, `AgeInYearsAndPortrait`, `AgeBirthYear`, and
`AgeBirthYearAndPortrait`), `ClassifySimpleConsentFn`, and
`defaultClassifySimpleConsent()` to classify non-PII age-verification
requests that can be combined with biometric authentication.

Add `SimpleConsentPromptData`, `resolveSimpleConsentPromptData()`, and
`SimpleConsentPrompt()` in `multipaz-compose` to resolve and render a
compact consent summary displaying the relying party icon, localized age
request heading, a circular top-right cancel button, and an inline
summary with the wallet app icon, bold app name, card art, bold document
name, shared claim summary, and a "More details" link to expand the full
consent sheet.

Bump Android `compileSdk` to API 37.2, add `PlatformConsentOptions`
(defaulting `showOnBiometricPrompt` to `true` on Android) and
`PresentmentSelection.preloadedKeyUnlockData` (consumed by
`mdocPresentment()`), and integrate Android's `EmbeddedBiometricPrompt`
in `ConsentModalBottomSheet()` via `ConsentEmbeddedBiometricPrompt()`
with `BiometricManager.canAuthenticate()` verification and LSKF fallback
via the "Use PIN" negative button.

Add `update-biometric-goldens.sh` and 8 Android 17 QPR2 biometric prompt
golden screenshots under `11_biometric_prompt/`, and update
`ConsentPromptScreen()`, the golden screenshot catalog, and unit tests.

Fixes #2170.

Test: ./gradlew :multipaz:jvmTest --tests "org.multipaz.consent.ConsentClassifierTest" --tests "org.multipaz.presentment.Iso18013PresentmentTest" -Pdisable.web.targets=true
Test: ./gradlew :multipaz-compose:testDebugUnitTest --tests "org.multipaz.compose.presentment.ConsentGoldenScreenshotTest" --tests "org.multipaz.compose.presentment.SimpleConsentPromptDataTest" -Pdisable.web.targets=true
Test: ./gradlew :multipaz:detektMetadataCommonMain :multipaz-compose:detektMetadataCommonMain :samples:testapp:assembleDebug -Pdisable.web.targets=true
Test: Manually verified in TestApp on Android 17 QPR2.
Signed-off-by: David Zeuthen <zeuthen@gmail.com>
@davidz25
davidz25 force-pushed the combine-consent-and-biometric branch from a5d5b14 to d2176f3 Compare November 9, 2026 18:03
@davidz25
davidz25 merged commit e6ea17e into main Nov 9, 2026
4 checks passed
@davidz25
davidz25 deleted the combine-consent-and-biometric branch November 9, 2026 18:50
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.

Combine simple consent and biometric authentication on Android

2 participants