Skip to content

Conversation

@MattShirley
Copy link
Collaborator

Adds graceful exits (prevents 500 errors) when accessing the refresh token route when:

  1. ENABLE_AUTH is set to false: return 200
  2. ENABLE_AUTH is set to true and user doesn't have a valid JWT: return 401

Also adds basic testing for token refreshes.

@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.77%. Comparing base (7acb93e) to head (d635ef5).
⚠️ Report is 12 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1194      +/-   ##
===========================================
+ Coverage    85.49%   85.77%   +0.27%     
===========================================
  Files           94       94              
  Lines         3185     3191       +6     
  Branches       357      359       +2     
===========================================
+ Hits          2723     2737      +14     
+ Misses         388      380       -8     
  Partials        74       74              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

pre-commit-ci bot and others added 10 commits October 29, 2025 21:43
…rer_token-env-variable-configured-in-enviroment' of https://github.com/ssl-hep/ServiceX into 874-appauth-false-settings-doesnt-work-anymore-with-bearer_token-env-variable-configured-in-enviroment
…rer_token-env-variable-configured-in-enviroment' of https://github.com/ssl-hep/ServiceX into 874-appauth-false-settings-doesnt-work-anymore-with-bearer_token-env-variable-configured-in-enviroment
…rer_token-env-variable-configured-in-enviroment' of https://github.com/ssl-hep/ServiceX into 874-appauth-false-settings-doesnt-work-anymore-with-bearer_token-env-variable-configured-in-enviroment
Copy link
Collaborator

@ponyisi ponyisi left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@MattShirley MattShirley merged commit e68e6a4 into develop Oct 30, 2025
78 checks passed
@MattShirley MattShirley deleted the 874-appauth-false-settings-doesnt-work-anymore-with-bearer_token-env-variable-configured-in-enviroment branch October 30, 2025 15:04
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.

app.auth: false settings doesnt work anymore with BEARER_TOKEN env variable configured in enviroment

3 participants