Skip to content

Frontend/nodeapi/userprofileupdatev1#49

Merged
CDevmina merged 9 commits intoDevelopmentfrom
frontend/nodeapi/userprofileupdatev1
Apr 20, 2025
Merged

Frontend/nodeapi/userprofileupdatev1#49
CDevmina merged 9 commits intoDevelopmentfrom
frontend/nodeapi/userprofileupdatev1

Conversation

@CDevmina
Copy link
Owner

This pull request introduces several updates to enhance user profile management, improve code maintainability, and update the front-end dependencies. The changes include updates to the API schema, refactoring of Auth0-related utilities, adjustments in user profile handling, and front-end enhancements. Below are the most significant changes grouped by theme:

Back-End: API Schema Updates

  • Removed the ObjectId format from the userId field in multiple schemas (User, UserPreferences) to simplify its representation (api-service/api/openapi.yaml, web/src/api/types/data-contracts.ts). [1] [2] [3] [4]
  • Added username and phone fields to the UserUpdate schema, along with descriptions for better API documentation (api-service/api/openapi.yaml, web/src/api/types/data-contracts.ts). [1] [2]
  • Enhanced descriptions for fields like optInStores, optOutStores, and allowedDomains in the user schema to clarify their purpose (api-service/api/openapi.yaml).

Back-End: Auth0 Integration Refactoring

  • Consolidated Auth0-related operations (e.g., updating username, phone, and deleting users) into reusable utility functions (updateAuth0Username, updateUserPhone, deleteAuth0User) for better maintainability (api-service/utils/auth0Util.js). [1] [2]
  • Replaced inline Auth0 API calls in UserProfileService and StoreProfileService with the new utility functions to reduce redundancy and improve error handling (api-service/service/UserProfileService.js, api-service/service/StoreProfileService.js). [1] [2] [3] [4]

Back-End: User Profile Management Enhancements

  • Enhanced the updateUserProfile function to handle Auth0 username and phone updates, ensuring consistency between the local database and the identity provider (api-service/service/UserProfileService.js).
  • Improved cache invalidation logic to ensure accurate user data retrieval after updates or deletions (api-service/service/UserProfileService.js). [1] [2]

Front-End: Dependency and UI Updates

  • Added react-hook-form as a new dependency to simplify form handling (web/package.json, web/package-lock.json). [1] [2]
  • Adjusted the modal size in RegistrationCompletionModal and removed unnecessary labels in RegistrationProgress for a cleaner UI (web/src/components/auth/RegistrationCompletionModal.tsx, web/src/components/auth/RegistrationProgress.tsx). [1] [2]

Miscellaneous

  • Removed unused imports and replaced deprecated methods to improve code quality and reduce clutter (api-service/service/StoreProfileService.js, api-service/service/UserProfileService.js). [1] [2]

… refactor preferences handling

feat(auth0): add utility functions for updating user phone and deleting users from Auth0
chore(deps): add react-hook-form dependency to package.json and package-lock.json
…ce data sharing consent handling with popover
@CDevmina CDevmina self-assigned this Apr 20, 2025
@CDevmina CDevmina added the enhancement New feature or request label Apr 20, 2025
@CDevmina CDevmina merged commit fe163f6 into Development Apr 20, 2025
3 of 8 checks passed
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.

1 participant