Skip to content

Conversation

@adamrefaey
Copy link
Collaborator

feat: add Cognito Identity client and enhance DirectCognitoAuthService for token management and AWS credentials retrieval

…e for token management and AWS credentials retrieval
@adamrefaey adamrefaey requested review from GuidoBR and Copilot May 5, 2025 16:33
@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 enhances token management and AWS credentials retrieval by integrating the Cognito Identity client into the DirectCognitoAuthService. Key changes include adding new methods to refresh tokens and obtain AWS credentials via Cognito Identity, and updating the authentication session flow accordingly.

Files not reviewed (2)
  • frontend/package-lock.json: Language not supported
  • frontend/package.json: Language not supported
Comments suppressed due to low confidence (2)

frontend/src/common/services/auth/direct-cognito-auth-service.ts:49

  • [nitpick] The Cognito Identity Provider client region is hardcoded to 'us-east-1', whereas the identity client uses the REGION constant. Consider using the REGION constant for both clients to ensure consistency across environments.
private static client = new CognitoIdentityProviderClient({ region: 'us-east-1' });

frontend/src/common/services/auth/direct-cognito-auth-service.ts:446

  • InitiateAuthCommand is used in the refreshTokensIfNeeded method but is not imported. Please add the appropriate import statement for InitiateAuthCommand from the AWS SDK.
const refreshCommand = new InitiateAuthCommand(refreshParams);

@GuidoBR GuidoBR merged commit f6b64c9 into main May 5, 2025
1 check passed
@adamrefaey adamrefaey deleted the NO-TICKET-FIX-AUTH branch May 5, 2025 16:45
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