Using access and refresh tokens with AWS Cognito to

Hi. I am using AWS cognito for authentication. I use the API connector to authentic my users OTP code verification. Users put in their phone # then verify a code we text to them to authenticate. When authenticated, I save an access token to the current users session. I then pass this access token in the header of API calls as needed.

I am looking to extend user session duration to 30 days. I set up a refresh token and an API endpoint to get a new access token using the refresh token when the access token is expired. My issue is that I am not able to save the refresh token for longer than 72 hours as that is when a current user session expires.

Can anyone advise on how I can store the refresh token for 30 days? This would enable me to increase session duration for my users to 30 days.