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

Auth: Allow offline authentication check #204

Merged
merged 2 commits into from
Apr 6, 2023

Conversation

medikoo
Copy link
Contributor

@medikoo medikoo commented Apr 6, 2023

Full authentication checks when done async way collide with e.g. logout function, e.g. it's broken in following flow:

  • Check that user is logged in, find the id token is outdated, initialize refresh operation
  • Logout
  • Refreshed id token is returned by the auth server and we're logged in again.

This PR adds option that allow to do offline auth check, which we will not attempt to refresh the outdated id token.

Additionally increase debug logging in auth module

@medikoo medikoo added the enhancement New feature or request label Apr 6, 2023
@medikoo medikoo self-assigned this Apr 6, 2023
@medikoo medikoo force-pushed the 0406-improve-auth-configurability branch from 80cb003 to caa434d Compare April 6, 2023 14:33
@codecov
Copy link

codecov bot commented Apr 6, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@187f2da). Click here to learn what that means.
Patch coverage: 81.25% of modified lines in pull request are covered.

❗ Current head 2dc8f5b differs from pull request most recent head caa434d. Consider uploading reports for the commit caa434d to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #204   +/-   ##
=======================================
  Coverage        ?   89.91%           
=======================================
  Files           ?       28           
  Lines           ?      833           
  Branches        ?        0           
=======================================
  Hits            ?      749           
  Misses          ?       84           
  Partials        ?        0           
Impacted Files Coverage Δ
auth/resolve-token.js 72.60% <50.00%> (ø)
config.js 94.11% <90.00%> (ø)
auth/resolve-mode.js 91.66% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@medikoo medikoo merged commit 123588f into main Apr 6, 2023
4 checks passed
@medikoo medikoo deleted the 0406-improve-auth-configurability branch April 6, 2023 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant