amazon-archives/aws-serverless-auth-reference-app

Where is Refresh token being managed?

Closed this issue · 1 comments

I'm looking at the app, but I can't seem to find where the refresh token is managed.

If I understand correctly, the access token in only good for 1 hour.
So, when calling any AWS service, I think the app should check for token validity and then refresh it before attempting the actual call.

Is there a portion of the code doing this?
I would very much like to see a real example.

Thanks in advance.

Hi there-

If you run the sample app via browser with "ionic serve," and open the developer tools of your browser at the same time, you'll see your various JWT tokens listed in the console.

The refresh token in our case is valid for 30 days, which is a setting of the particular application within the user pool and its settings (you can configure this value to the duration of your choice). You can find the app settings in the Cognito User Pools console under "Apps."

Let us know if you have further questions after checking this out.

Justin