Repository navigation
Combine simple consent and biometric authentication on Android. - #2171
Merged
Merged
Conversation
justinbrickell
approved these changes
Nov 9, 2026
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
force-pushed
the
combine-consent-and-biometric
branch
from
November 9, 2026 18:03
a5d5b14 to
d2176f3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce
SimpleConsent,SimpleConsentClaim(coveringAgeOver,AgeOverAndPortrait,NotAgeOver,NotAgeOverAndPortrait,AgeInYears,AgeInYearsAndPortrait,AgeBirthYear, andAgeBirthYearAndPortrait),ClassifySimpleConsentFn, anddefaultClassifySimpleConsent()to classify non-PII age-verification requests that can be combined with biometric authentication.Add
SimpleConsentPromptData,resolveSimpleConsentPromptData(), andSimpleConsentPrompt()inmultipaz-composeto 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
compileSdkto API 37.2, addPlatformConsentOptions(defaultingshowOnBiometricPrompttotrueon Android) andPresentmentSelection.preloadedKeyUnlockData(consumed bymdocPresentment()), and integrate Android'sEmbeddedBiometricPromptinConsentModalBottomSheet()viaConsentEmbeddedBiometricPrompt()withBiometricManager.canAuthenticate()verification and LSKF fallback via the "Use PIN" negative button.Add
update-biometric-goldens.shand 8 Android 17 QPR2 biometric prompt golden screenshots under10_biometric_prompt/, and updateConsentPromptScreen(), the golden screenshot catalog, and unit tests.Fixes #2170.