Skip to content
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

Consider spec-ing when a user agent should allow activationless PaymentRequest #1022

Open
stephenmcgruer opened this issue Feb 13, 2024 · 0 comments

Comments

@stephenmcgruer
Copy link
Collaborator

stephenmcgruer commented Feb 13, 2024

In #1009, we added support for calling PaymentRequest.show() without a user activation. This was done to support redirect use-cases, a few concrete examples of which are:

  1. A user is checkout out on merchant.example. They select a payment method, and the merchant redirects the user to a PSP experience to handle that payment method. The PSP wants to immediately trigger the payment experience without the user having to re-click.
  2. A user is using a shopping aggregator site, that shows results from many merchants at once. The user selects Buy now via PayApp on a particular item from a particular merchant. The aggregator site redirects to the merchant site, which wants to immediately trigger payment via PayApp without the user having to re-click.

When we spec'd this, we were vague about when the user agent should allow an activationless PaymentRequest, and we didn't do the best job of motivating the need in the spec itself. We should revisit this, and try to see if there's a path to spec or at least provide non-normative guidance for user agents. This may not be trivial, as at least in Chrome we want some control to apply friction in cases where we think the website or 'payment app' may be (partially) malicious, but it's worth giving a go :)

Some possible non-exhaustive angles to consider:

  1. Look at cross-navigation capability delegation, such that the users original intent/activation can be carried through the redirect.
  2. Spec formally Chrome's "one free try" approach that we currently implement.

Marcos also mentioned that the Screen Wake Lock API had a similar need, though I don't personally know the details.

stephenmcgruer added a commit that referenced this issue Aug 21, 2024
As per the plan outlined in #1021#issuecomment-2107832273, we have now
created the CR Snapshot and published a new CR Draft
(https://www.w3.org/TR/payment-request/) that includes restoring
the address changes. The only remaining work for that plan is to restore
the previous changes that had been made since REC.

Changes included:
  - [Spec] Relax user activation requirement for show() #1009

Additional edits on tops of above changes:
  - Add note linking to issue #1022 for discussion of user activation
    relaxing conditions

Fixes #1025
stephenmcgruer added a commit that referenced this issue Aug 21, 2024
As per the plan outlined in #1021#issuecomment-2107832273, we have now
created the CR Snapshot and published a new CR Draft
(https://www.w3.org/TR/payment-request/) that includes restoring
the address changes. The only remaining work for that plan is to restore
the previous changes that had been made since REC.

Changes included:
  - [Spec] Relax user activation requirement for show() #1009

Additional edits on tops of above changes:
  - Add note linking to issue #1022 for discussion of user activation
    relaxing conditions

Fixes #1025
ianbjacobs pushed a commit that referenced this issue Sep 9, 2024
As per the plan outlined in #1021#issuecomment-2107832273, we have now
created the CR Snapshot and published a new CR Draft
(https://www.w3.org/TR/payment-request/) that includes restoring
the address changes. The only remaining work for that plan is to restore
the previous changes that had been made since REC.

Changes included:
  - [Spec] Relax user activation requirement for show() #1009

Additional edits on tops of above changes:
  - Add note linking to issue #1022 for discussion of user activation
    relaxing conditions

Fixes #1025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant