Status Update
Comments
he...@google.com <he...@google.com> #2
Branch: androidx-main
commit 924b7e11734c0cd506a496f448e1a96b7b86ee68
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Feb 02 14:19:35 2022
Take CreationExtras in activity viewModel function
Add function to take CreationExtras in the viewModels -ktx extension
function.
RelNote: "You can now pass `CreationExtras` to the activity by
viewModels function"
Test: ActivityViewModelLazyTest
Bug: 217600303
Change-Id: I6a3e64fb4ec1c18510ab5f45b3533de586f50d77
M activity/activity-ktx/api/current.txt
M activity/activity-ktx/api/restricted_current.txt
M activity/activity-ktx/api/api_lint.ignore
M activity/activity-ktx/src/main/java/androidx/activity/ActivityViewModelLazy.kt
M activity/activity-ktx/api/public_plus_experimental_current.txt
M activity/activity-ktx/src/androidTest/java/androidx/activity/ActivityViewModelLazyTest.kt
ap...@google.com <ap...@google.com> #3
This has been added internally and will be available in the Activity 1.5.0-alpha03
release.
pr...@google.com <pr...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.credentials:credentials-play-services-auth:1.0.0-alpha05
sh...@gmail.com <sh...@gmail.com> #6
The same error 'CreatePublicKeyCredentialDomException' is thrown with weird error message (errorMessage) - "Unable to get sync account."
va...@shopify.com <va...@shopify.com> #7
I also confirm that the issue still exists in 1.0.0-alpha05
va...@shopify.com <va...@shopify.com> #8
I think the error type changed from ConstraintError to NotAllowedError for alpha05, but still not CreateCredentialCancellationException as expected.
he...@google.com <he...@google.com> #9
It's possible that ConstraintError is thrown once the passkey flow is started. This is according to the webauthn spec:
"If the user does not consent, return an error code equivalent to "NotAllowedError" and terminate the operation."
"If the user exercises a user agent user-interface option to cancel the process" ... "Throw a "NotAllowedError" DOMException."
Therefore, for a passkey request, you should be ready to handle both the CancellationException and the PublicKeyCredentialException(ConstraintError) as a signal for user cancellation.
va...@shopify.com <va...@shopify.com> #10
Therefore, for a passkey request, you should be ready to handle both the CancellationException and the PublicKeyCredentialException(ConstraintError) as a signal for user cancellation.
You mean NotAllowedError
?
he...@google.com <he...@google.com> #11
Oops good catch. Yes by ConstraintError
I meant NotAllowedError
Description
Component used: Credentials
Version used: 1.0.0-alpha03
Devices/Android versions reproduced on: Huawei P30 Pro (VOG-L29)
I have multiple Google accounts on my phone. After triggering the passkey registration modal, I pressed the "Cancel" button and I got a CreatePublicKeyCredentialDomException with ConstraintError instead of the expected CreateCredentialCancellationException
Here are some logs (PasskeyUtils is from my application):