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

Only attempt to refresh auth token when user is authenticated #3721

Merged
merged 4 commits into from
Dec 12, 2024

Conversation

miasma13
Copy link
Contributor

Task/Issue URL: https://app.asana.com/0/414709148257752/1208966018277167/f

Description:
Following Increase of 401s in auth api - Darwin we found that the refreshAuthTokenIfNeeded is being called without a proper check if user is authenticated (and tokens are present).

It also includes BSK check -> duckduckgo/BrowserServicesKit@fb809ed

Steps to test this PR:

  1. Ensure no PP is on the device
  2. Open PP purchase page
  3. Check if refreshAuthTokenIfNeeded was not called and no calls to validate_token endpoint were made.
  4. Purchase or activate subscription
  5. Open add/edit email page
  6. Check if refreshAuthTokenIfNeeded was properly called with a call to validate_token endpoint.

Definition of Done (Internal Only):

Copy Testing:

  • Use of correct apostrophes in new copy, ie rather than '

Orientation Testing:

  • Portrait
  • Landscape

Device Testing:

  • iPhone SE (1st Gen)
  • iPhone 8
  • iPhone X
  • iPhone 14 Pro
  • iPad

OS Testing:

  • iOS 15
  • iOS 16
  • iOS 17

Theme Testing:

  • Light theme
  • Dark theme

Internal references:

Software Engineering Expectations
Technical Design Template

@miasma13 miasma13 requested a review from bwaresiak December 12, 2024 12:31
Copy link
Collaborator

@bwaresiak bwaresiak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@miasma13 miasma13 merged commit 02a9657 into release/7.149.0 Dec 12, 2024
13 checks passed
@miasma13 miasma13 deleted the michal/guard-refresh-auth-token branch December 12, 2024 13:03
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

Successfully merging this pull request may close these issues.

2 participants