forked from Code-4-Community/scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description: Currently, our signin implementation authenticates users using Cognito and returns access and refresh tokens. We need to create an endpoint that allows the application to obtain new authentication tokens using refresh tokens. This will enable automatic token renewal without requiring users to re-authenticate, improving user experience and security. The implementation has 3 steps:
- Create an endpoint in auth.controller.ts + service method in auth.service.ts that takes in a refresh token and returns an authentication token
- Create a method that calls the endpoint in apiClient.ts
- Test added controller and service methods
Acceptance Criteria:
- An endpoint + service method exists that accepts a refresh token as input and returns a valid authentication token
- A method is implemented in apiClient.ts that calls the refresh token endpoint
- Sufficient test coverage of added controller and service methods
- Error handling is implemented for invalid or expired refresh tokens
Supporting Materials:
- Access tokens and Cognito: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-the-access-token.html
- Refresh tokens and Cognito: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-the-refresh-token.html
Effort Estimate:
- T-shirt size: M
Metadata
Metadata
Assignees
Labels
No labels