🔧 fix(parameterComponent): remove unused dict and dictArr state variables
🔧 fix(parameterComponent): remove unused useEffect hook
🔧 fix(parameterComponent): update onChange handler to setObj instead of setDict
🔧 fix(keypairListComponent): remove commented out code for future feature
🔧 fix(EditNodeModal): update condition to check for "keypairlist" type instead of "keypair" type
🔧 fix(types): update onChange type in DictComponentType to accept any value
🔧 fix(reactflowUtils): remove unnecessary comments and newline at end of file
🐛 fix(dictComponent): fix import statement for DictComponentType in dictComponent
🐛 fix(keypairListComponent): fix import statement for KeyPairListComponentType in keypairListComponent
🐛 fix(EditNodeModal): fix incorrect type check for dict and keypair components in EditNodeModal
🐛 fix(types): rename KeyPairListComponent to KeyPairListComponentType and add DictComponentType
🎨 style(App.css): reformat CSS code for better readability and consistency
🚀 feat(App.css): add styles for json-view component
🔨 refactor(parameterComponent): extract DictComponent to a separate file for reusability
🔧 chore(constants): add constant for CODE_DICT_DIALOG_SUBTITLE
🔨 refactor(EditNodeModal): extract DictComponent to a separate file for reusability
🔧 chore(constants): add constant for CODE_DICT_DIALOG_SUBTITLE
🔨 refactor(codeAreaModal): remove unused isTweakPage variable
🚀 feat(dictAreaModal): add DictAreaModal component to allow editing of dictionaries
🔧 chore(styleUtils.ts): import and add BookMarked icon to nodeIconsLucide for future use
🐛 fix(keypairListComponent): remove console.log statement
🐛 fix(keypairListComponent): add class 'input-invalid' to input when duplicate key is detected
🐛 fix(EditNodeModal): fix incorrect condition for rendering KeypairListComponent based on type
🎨 style(applies.css): add styles for 'input-invalid' class to indicate invalid input
🐛 fix(parameterComponent): fix logic error in onChange handler to update dictArr state when there are duplicate keys in the array
✨ feat(parameterComponent): add type annotation to onChange handler parameter to improve code clarity
✨ feat(parameterComponent): add error handling for duplicate keys in dictionary input field to prevent saving invalid data
🐛 fix(keypairListComponent): fix logic for handling duplicate keys in key-value pairs to prevent saving invalid data
🚚 chore(types): add optional duplicateKey property to KeyPairListComponent type
✨ feat(reactflowUtils): add utility functions to convert object to array and array to object, and check for duplicate keys in an array of objects
- Update "@emotion/react" to version "^11.11.1"
- Update "@emotion/styled" to version "^11.11.0"
- Update "@headlessui/react" to version "^1.7.17"
- Update "@heroicons/react" to version "^2.0.18"
- Update "@mui/material" to version "^5.14.7"
- Update "@tabler/icons-react" to version "^2.32.0"
- Update "@tailwindcss/forms" to version "^0.5.6"
- Update "ace-builds" to version "^1.24.1"
- Update "axios" to version "^1.5.0"
- Update "class-variance-authority" to version "^0.6.1"
- Update "dompurify" to version "^3.0.5"
- Update "esbuild" to version "^0.17.19"
- Update "react-error-boundary" to version "^4.0.11"
- Update "react-icons" to version "^4.10.1"
- Update "react-router-dom" to version "^6.15.0"
- Update "react-tabs" to version "^6.0.2"
- Update "react-tooltip" to version "^5.21.1"
- Update "rehype-mathjax" to version "^4.0.3"
- Update "shadcn-ui" to version "^0.2.3"
- Update "tailwind-merge" to version "^1.14.0"
- Update "tailwindcss-animate" to version "^1.0.7"
chore(frontend): update devDependencies in package.json
- Update "@swc/cli" to version "^0.1.62"
- Update "@swc/core" to version "^1.3.80"
- Update "@tailwindcss/typography" to version "^0.5.9"
- Update "@testing-library/jest-dom" to version "^5.17.0"
- Update "@testing-library/react" to version "^13.4.0"
- Update "@testing-library/user-event" to version "^13.5.0"
- Update "@types/lodash" to version "^4.14.197"
- Update "@types/node" to version "^16.18.46"
- Update "@types/react
🔒 refactor(base.py): remove SECRET_KEY field from Settings class since it is now handled by AuthSettings class
🔒 refactor(manager.py): pass CONFIG_DIR to AuthSettings constructor when creating an instance
The accessToken parameter in the chatEndpoint URL is now encoded using the encodeURIComponent function to handle special characters correctly. This ensures that the accessToken is properly passed to the chat endpoint without causing any issues.
✨ feat(parameterComponent): add support for editing key-value pairs in the parameter component
🐛 fix(genericIconComponent): fix stroke width prop name to strokeWidth to fix SVG rendering issue
🐛 fix(keypairListComponent): import GenericModal from correct path to fix compilation error
✨ feat(keypairListComponent): add support for editing key-value pairs in the keypair list component
🐛 fix(editNodeModal): import KeypairListComponent from correct path to fix compilation error
✨ feat(editNodeModal): add support for editing key-value pairs in the edit node modal
🐛 fix(types): change value type in KeyPairListComponent to any to allow for any key-value pair
🔧 fix(alertContext): remove isTweakPage and setIsTweakPage from alertContext
🔧 fix(genericModal): add null check for nodeClass before calling postValidatePrompt
🔧 fix(extraSidebarComponent): remove setIsTweakPage from extraSidebarComponent
🔧 fix(typesContext): remove isTweakPage and setIsTweakPage from typesContext
### Description
This pull request introduces a significant enhancement to the project by
incorporating robust authentication logic. The enhancement addresses the
critical need for secure user access and data protection within the
application. With this addition, the system will be able to authenticate
users, verify their identities, and provide access only to authorized
individuals.
### Changes Implemented
- **Authentication Middleware**: A new middleware module has been
implemented to intercept incoming requests and validate user
authentication. This middleware checks for valid authentication tokens
or credentials and ensures that only authenticated users can access
protected resources.
- **User Authentication Endpoint**: A new endpoint has been created to
handle user authentication. This endpoint allows users to provide their
credentials, which are then securely processed and validated against the
stored user data.
- **Password Hashing**: User passwords are now securely hashed using a
strong cryptographic algorithm before being stored in the database. This
ensures that even if the database is compromised, user passwords remain
inaccessible.
- **Token-Based Authentication**: Upon successful authentication, the
system generates a time-limited access token for the user. This token
must be included in subsequent requests to access protected resources.
Token validity is maintained through token expiration and refresh
mechanisms.
- **Authorization Checks**: The logic has been extended to include
authorization checks after successful authentication. This ensures that
authenticated users only have access to the resources they are
authorized to use, based on their roles and permissions.
### Benefits
1. **Enhanced Security**: By implementing strong authentication
mechanisms and password hashing, the project significantly improves
security, minimizing the risk of unauthorized access or data breaches.
2. **User-Friendly Experience**: Users can securely access the
application, confident in the knowledge that their credentials and data
are protected. The token-based authentication simplifies the user
experience by eliminating the need for frequent re-authentication.
3. **Scalability**: The authentication logic has been designed with
scalability in mind, ensuring that the system can handle a growing
number of users and requests without compromising security or
performance.
4. **Modularity**: The new authentication logic has been integrated as a
separate module, enhancing the project's modularity and maintainability.
fix(AdminPage/index.tsx): fix nullish assertion for create_at and updated_at properties to avoid potential errors
fix(signUpPage/index.tsx): fix error handling to correctly display error message
fix(types/components/index.ts): make id, create_at, and updated_at properties optional in UserInputType
✨ feat(headerComponent): add Home link when on admin page for easier navigation
✨ feat(headerComponent): add Admin page link for easier navigation to admin page
🐛 fix(ApiKeysPage): handle case when api_keys.name is null or undefined by displaying "-" instead
🐛 fix(ApiKeysPage): handle case when api_keys.last_used_at is an invalid date by displaying "Never" instead
✨ feat(ApiKeysPage): add Total Uses column to display the total number of uses for each API key
🐛 fix(loginPage): set isAdmin context variable based on user's is_superuser property
🐛 fix(loginPage): increase delay before fetching logged user to 500ms for better user experience
🐛 fix(types): add total_uses property to ApiKey type to match backend response