furaiev / amazon-cognito-identity-dart-2

Unofficial Amazon Cognito Identity Provider Dart SDK, to easily add user sign-up and sign-in to your mobile and web apps with AWS.
MIT License
182 stars 113 forks source link

Federated Login... Refresh Access Token #245

Closed danielgchap closed 8 months ago

danielgchap commented 9 months ago

Hey there,

I'm trying to get a new access token. I used this:

Future signUserInWithAuthCode(String authCode) async { String url = 'https://$_domain.auth.$_region.amazoncognito.com/oauth2/token?' 'grant_type=authorization_code&client_id=$_appClientId' '&redirect_uri=$_redirectURI&code=$authCode';

This gives me a CognitoUserSession. I can also build a CognitoUser off of that.

When I call cognitoUser.refreshSession.. it gives me an updated expiration time, but all the tokens are the same. On the web side, the accessToken is changing. Is there something I can do in order to mitigate this?

Please advise as to how YOU would do this please?

Thanks!

github-actions[bot] commented 8 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 8 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.