Automattic / woocommerce-payments

Accept payments via credit card. Manage transactions within WordPress.
https://wordpress.org/plugins/woocommerce-payments/
Other
171 stars 69 forks source link

OAuth flow - detect if an oauth session is already active #183

Closed marcinbot closed 3 weeks ago

marcinbot commented 5 years ago

See https://github.com/Automattic/woocommerce-payments/pull/171#issuecomment-521056967

The OAuth init endpoint returns a secret which gets stored as a transient for a day or until the flow is finished. If at the end of the flow the passed in secret mismatches the transient, then no account is connected and an error is shown. This can lead to a few edge cases:

Potential solutions:

vbelolapotkov commented 2 years ago

This one seems to be relevant. This is where we set onboarding state today https://github.com/Automattic/woocommerce-payments/blob/3a958f7c4e7399b7acde0700612bb3a1fa389fbe/includes/class-wc-payments-account.php#L706-L706

We still don't check that state before initiating onboarding.

jessy-p commented 7 months ago

This issue impacts Onboarding, Account management, General purpose communications and communication tools, so assigning to Moltres (based on team responsibilities Pc2DNy-3z-p2) @daquinons. Assigning as part of Gamma Triage process PcreKM-yM-p2.

Reassigning this old issue while re-evaluating backlog.