Re: [w3c/payment-request] User activation et webauthn (Issue #1002)

Hello Stephenmcgruer
we do this : 
const response = await request.show(); // here we can see the show window and we click on continue
const authenticatorResponse = await navigator.credentials.get({publicKey});// here we request the fingerprint, and if the user takes it's time, we get this error :
then : request.complete(); 


myOnClickFunction() {
  try {
            const allowedCres = await checkCredentialIds();/* public key is stocked in a remote server, this function call a fetch to get it  */
           const response = await request.show(); // call the show method to display our window, we use our payment method
           const publicKey= formatCredentialRequest(allowedCres, coerceToArrayBuffer);/* format the credentials to array buffer as 
           requested by navigator.credentials.get(); next line will show the window for the fingerprint, the problem is here when we wait a lots of time for the user to give his fingerprint we get :  Failed to execute 'show' on 'PaymentRequest' */
           const cred = navigator.credentials.get(publicKey);
           const credFormated =await formatedResponseShowPR(cred)// here we format the credentials 
          let result;
             try {
             const responseAuthenticate = await authenticateValidation(credFormated);/* we use a fetch call to check creds in a 
             remote server */
             result = responseAuthenticate.ok ? "success" : "fail";
           } catch (err) {
             result = "fail";
           }
   // PS: since we didn't use local storage for webauthn and we use api calls , that may take a lot of time t
          response.complete(result)
          ......

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/issues/1002#issuecomment-1495538017
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/payment-request/issues/1002/1495538017@github.com>

Received on Tuesday, 4 April 2023 08:14:28 UTC