Skip to content

User activation et webauthn  #1002

@asma1402

Description

@asma1402

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions