feat: JWT apiAuthentication UI integration#1096
Conversation
✅ Deploy Preview for endearing-brigadeiros-63f9d0 canceled.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1096 +/- ##
==========================================
+ Coverage 82.80% 82.83% +0.02%
==========================================
Files 66 66
Lines 2786 2784 -2
Branches 334 334
==========================================
- Hits 2307 2306 -1
+ Misses 432 431 -1
Partials 47 47 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@jescalada - thanks for the PR ❤️ Perhaps it makes sense to display the error message outside of the table in a pop-up? Open until closed by the user? |
|
I've tried to find better-looking error displays (such as custom-styled Snackbars, and other components), but it seems MUI v4 doesn't support some of the best ones. In later versions of MUI we can use these Alert components or combine them with Snackbars to make it look better. There's this issue for upgrading MUI to v5 #1023 which I'll take a look at soon. It might be worth modernizing the frontend a bit once the dependency upgrades are done. (Note: Upgrading directly to v7 is not possible as each new major version introduces various breaking changes - plus the automatic migration tools only go up one major version at a time) |
…-proxy into JWT-UI-integration
dcoric
left a comment
There was a problem hiding this comment.
This looks great! Thanks for putting this together. 🚀
I've left a few small nitpicks for your consideration. The main one is just removing the console.log from getAxiosConfig to keep our output clean.
Once that's sorted, this is good to go!

Fixes #1091.
This PR adds a Settings page that allows configuring the JWT token to authenticate UI requests to the API:
Previously, requests were bypassing the JWT check if they came from an authenticated user, and being completely blocked when not logged in.
This PR also improves the error messages shown when JWT authentication fails:
Missing token
Bad JWT format
Expired JWT