-
Notifications
You must be signed in to change notification settings - Fork 25
feat: load config authenticated #1249
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements authenticated configuration loading by fetching the config a second time with an authentication token after the user has been loaded. It also removes deprecated application properties to clean up the codebase.
Key changes:
- Adds authenticated config reload functionality after user authentication
- Removes deprecated app properties (
applicationMenu,isFileEditor,type,quickActions) - Refactors TopBar component from Options API to Composition API and removes legacy application menu handling
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/web-runtime/src/index.ts | Adds second config load call with authentication token |
| packages/web-runtime/src/container/bootstrap.ts | Updates announceConfiguration to accept optional token parameter |
| packages/web-runtime/src/layouts/Application.vue | Removes deprecated apps store usage and props passing |
| packages/web-runtime/src/components/Topbar/TopBar.vue | Refactors to Composition API and removes legacy application menu logic |
| packages/web-pkg/src/composables/piniaStores/apps.ts | Removes deprecated applicationMenu property from app registration |
| packages/web-pkg/src/apps/types.ts | Removes deprecated type definitions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Loads the config authenticated so we are prepared when the server sends a user specific config in the future.
a3879f2 to
82f9666
Compare
We can savely remove them since there should be no app running using these.
82f9666 to
4370a06
Compare
| }) => { | ||
| const request = await fetch(path, { headers: { 'X-Request-ID': uuidV4() } }) | ||
| const request = await fetch(path, { | ||
| headers: { 'X-Request-ID': uuidV4(), ...(token && { Authorization: `Bearer ${token}` }) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just thinking, what about public links? Should we authenticate with public link auth as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm do you think it's necessary? Isn't public basically always anonymous and therefore non-user-specific?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. I guess we can start without and if there'll be good reasons from someone, then we think about it again.
kulmann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💪
Loads the config a second time authenticated after the user has been loaded.
The acceptance criteria from the story can not be fulfilled because we need routes to load the auth context, and we need apps for the routes. Hence it's not possible to load the apps after the authenticated config. However, this doesn't seem to be needed because the
extensionsprop of an application is defined as arefand is therefore reactive. That means checks on a user-specific config can still be made.Also removes deprecated app properties.
closes #1050