Pocket / extension-save-to-pocket

Save to Pocket is a browser extension that is used to save pages to a connected Pocket account
https://getpocket.com
MIT License
273 stars 48 forks source link

fix(auth): adding logging to the auth process for support team [FRONT-1488] #273

Closed anthony-liddle closed 2 years ago

anthony-liddle commented 2 years ago

Goal

Adding logging to help the Support team troubleshoot auth issues our users are having.

Todos:

Implementation Decisions

It's difficult to reproduce the auth issues our users are running into, so I've added logging that our Support team can ask for.

The first bit of logging is for the getpocket.com/extension_login_success page. If this page hangs, you can open the console and verify whether there is a stored cookie for token or userId. These cookies should be created on the previous page.

The second bit of logging is displays the userId, token, guid and where the guid originates. The guid can originate from extension (stored in chrome.storage), site (stored in a cookie as sess_guid), or server (fetched from v3/guid). There should be 4 values in this object.

The last bit is adding the response.status to our request error handler. This way it's surfaced in the extension service worker console instead of needing to dig for it within the network panel.