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

WIP: feat: Enhanced Client Side Auth Injection #397

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

andreituicu
Copy link
Collaborator

No description provided.

@andreituicu
Copy link
Collaborator Author

@dylandepass @rofe :
Just wanted to check with you if you have a preference for getting rid of the dependency cycle
I need use some functionality from tab.js into auth.js and vice-versa (mostly for testing purposes):
https://github.com/adobe/aem-sidekick/pull/397/files#diff-c715ce49ca7cc4f028d8587abb05649c289408d4ca5281e92b2e912e6bf3f1faR18

https://github.com/adobe/aem-sidekick/pull/397/files#diff-4c5f99b2513419fa18ff00eb342819760c6976cbc293f832cea7cac7cf6cc56cR22

https://github.com/adobe/aem-sidekick/pull/397/files#diff-c715ce49ca7cc4f028d8587abb05649c289408d4ca5281e92b2e912e6bf3f1faR238-R239

I think I see two options which I'm not a super big fan of either:

  1. Move things from auth.js into tab.js and consolidate.
  2. Change the tests so they don't expect setAuthToken to also update the network rules and rely just on tabs events to do it. In browser the login works, because the login flow auto-closes the tab, sending a tab event that reconfigures the rules.

@andreituicu
Copy link
Collaborator Author

  1. Move things from auth.js into tab.js and consolidate.

Hmm this might not work either... Looks like it creates other dependency cycles. I'll keep digging...

Copy link

codecov bot commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 3 lines in your changes missing coverage. Please review.

Project coverage is 99.69%. Comparing base (985cdf5) to head (255d71f).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/extension/auth.js 88.88% 2 Missing ⚠️
src/extension/tab.js 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #397      +/-   ##
==========================================
- Coverage   99.95%   99.69%   -0.26%     
==========================================
  Files          54       54              
  Lines        2184     2299     +115     
==========================================
+ Hits         2183     2292     +109     
- Misses          1        7       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant