Skip to content

Conversation

@adamrefaey
Copy link
Collaborator

fix: update type definitions and improve user data extraction from Cognito

@adamrefaey adamrefaey requested review from GuidoBR and Copilot May 5, 2025 17:38
@adamrefaey adamrefaey self-assigned this May 5, 2025
Copy link
Contributor

Copilot AI left a 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 updates the user data extraction logic from Cognito by switching from signInDetails.loginId to attributes.email and enhancing type definitions. The changes include updating the AuthProvider and useGetCurrentUser implementations, adding a new SignInDetails type in the user model, and updating tests to reflect these changes.

Reviewed Changes

Copilot reviewed 5 out of 8 changed files in this pull request and generated no comments.

File Description
frontend/src/common/providers/AuthProvider.tsx Update email extraction from signInDetails.loginId to attributes.email in userData
frontend/src/common/models/user.ts Add SignInDetails type definition for capturing Cognito login details
frontend/src/common/hooks/tests/useAuthOperations.test.ts Update test mocks to use AWS SDK proper command output types
frontend/src/common/api/useGetCurrentUser.ts Update email extraction to use cognitoUser.attributes.email
Files not reviewed (3)
  • frontend/package-lock.json: Language not supported
  • frontend/package.json: Language not supported
  • frontend/tsconfig.json: Language not supported

@adamrefaey adamrefaey merged commit 5c8bcc5 into main May 5, 2025
1 check passed
@adamrefaey adamrefaey deleted the NO-TICKET-FIX-COGNITO branch May 5, 2025 17:48
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.

3 participants