-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Overview
The main goal of this ticket is to add a route into our backend that uses the refresh token the frontend holds to basically refresh the main access token and id token. Each of these tokens are going to be stored in the cookies of the http request to our backend. You have to set these tokens in the cookies examples of setting the tokens can be found in the auth.controller.ts under the login route.
If any of this is confusing hopefully here are some resources that can make things more clear.
https://stackoverflow.com/questions/38986005/what-is-the-purpose-of-a-refresh-token
https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-the-refresh-token.html
https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Cookies
Tasks
- Create /refresh to the auth module
- Ensure the /refresh route uses the refresh token to fetch a new access token and id token
- Set the new access token and id token to the cookies response http request cookies
Acceptance Criteria
- /auth/refresh route uses the clients refresh token to fetch a new access token and id token for the client