refactor(client): use SDK storage helper in AuthenticationProvider.getLoginToken#40482
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
WalkthroughAuthenticationProvider switches login-token retrieval to the SDK storage helper: import adds ChangesLogin Token Storage Migration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor/drop-unstore-login-token-monkey-patch #40482 +/- ##
==================================================================================
+ Coverage 69.64% 69.66% +0.01%
==================================================================================
Files 3318 3318
Lines 122002 122002
Branches 21783 21810 +27
==================================================================================
+ Hits 84973 84994 +21
+ Misses 33701 33677 -24
- Partials 3328 3331 +3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
/jira ARCH-2116 |
…tLoginToken up the AuthenticationProvider so the last Accounts.storageLocation / Accounts.LOGIN_TOKEN_KEY reference in the client is gone. No behaviour change: same window.localStorage backend, same 'Meteor.loginToken' key. The Accounts import stays because callLoginMethod / _unstoreLoginToken / loggingIn are still used here.
e4cbd03 to
eda14b6
Compare
Summary
Drop the last
Accounts.storageLocationreference in the client.#40477 introduced
getLoginTokenviaAccounts.storageLocation.getItem(Accounts.LOGIN_TOKEN_KEY). #40479 then centralized that same access pattern behindgetStoredItem(STORAGE_KEYS.LOGIN_TOKEN)but couldn't touch this line because the two PRs were in flight at the same time. This is the catch-up.No behaviour change: same
window.localStoragebackend, same'Meteor.loginToken'key. TheAccountsimport stays in this file becausecallLoginMethod/_unstoreLoginToken/loggingInare still used here.Test plan
yarn eslinton the changed file: 0 errors/oauth/authorize?...while logged in; the hiddenaccess_tokenfield is populated from the stored login token and the form submits.useLoginToken()continues to return the same token for any consumer that reads it (e.g.AuthorizationFormPage).Summary by CodeRabbit
Task: ARCH-2137