-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User activation et webauthn #1002
Comments
Hi @asma1402 . Can you clarify the exact ordering of calls here? At first you say (emphasis mine):
But then you say:
The latter quote sounds like you are calling Are you able to post a code snippet showing what your code looks like? (Or even better, a reproduction website!) |
Hi Stephen the problem we have is that we have one button to do all the work, let's say a "pay" button, when we click on it we will is there any event that i can listen to to trigger the show method after the credentials.create(), or to keep the user transient for a mutch longer time?
|
Thanks for the details @asma1402 .
Which browsers are you thinking of? To my knowledge:
Returning to your problem: You are indeed correct that the problem is that if too much time passes between the user click event, and the call to There is unfortunately no current fix for what you are trying to do, because user activation cannot stay activated indefinitely as it would otherwise be no protection at all. However, we (Chrome) are currently considering relaxing the user activation requirement for Payment Request, such that a page might get one 'free' call (without user activation) to In the meantime, I can see two workarounds to your situation:
|
Hello,
I'm using SPC for payment, in my application, it doesn't work in some chrome old versions, and on fireFox, i'm trying to implement PaymentRequest with Webauthn to make it work like SPC, and using a fallback payment method for old version that doesn't support PaymentRequest Or Webauthn.
What i did is simple :
After i receive show() response, and before i call the complete methode, I use navigator.credentials.get() to tell the user to give his credentials, and send them to the relying party, if all good i send the PaymentResponse and the creds to the PaymentServer.
everything is working just fine, i have just one issue, if the user takes it's time before he gives his fingerprint or any other webauth credentials, i get this error :
uncaught (in promise) DOMException: Failed to execute 'show' on 'PaymentRequest': PaymentRequest.show() requires either transient user activation or delegated payment request capability
I read about user activation, and i learn't that it's a new feature implemented for security reasons, I guess when the user takes his time to click on webAuthn, the user activation timeout for show() is consumed and this error shows.
I don't know if there is any solution to keep user activation transient, untel the user give his fingerprint.
Thank you.
The text was updated successfully, but these errors were encountered: