My skill requires Account Linking which will authenticate customers with an AWS cognito user pool through OAuth 2.0 Protocol. I can specify in the user pool the TTL of the refresh token, which I decided to have it valid for 60 days.
From what I understand, alexa sends you the access token along with each request that your skill receives so you can identify customers using the skill. If their access token expires alexa would handle this by refreshing their token before forwarding the request with the access token to you. So you can have a valid access token.
Now, what happens when the refresh token expires? and does it expire after 60 days even if the customer is using the skill on daily basis? I guess what I'm asking is:
- When the access token expires and alexa refreshes it. Does the refresh token also get refreshed?
- If yes, how do we keep the customer signed in and their account linked when the refresh token expires after 60 days?